Contains Method In ArrayList Class
using System;
using System.Collections;
class ContainsMethod
{
static void Main()
{
ArrayList arrlist = new ArrayList();
arrlist.Add("Amit");
arrlist.Add("Mohit");
arrlist.Add(10);
bool result = arrlist.Contains(10);
if(result)
{
Console.WriteLine("Value exists");
}
else
{
Console.WriteLine("Value does not exists");
}
}
}
----------------------------------------------------------------------------------------------------------
Contains Method In ArrayList Class
Reviewed by Baljeet Singh
on
01:40
Rating:
No comments: