LINQ Contains() Method (C#.net):
The following code shows you how check whether the mentioned value is in array or not. If contains then returns true else if not then returns false. See the code below.
Code
List<string> words = new List<string> { "osama","saad","shizzi","bilal","ahsan" };
var query = words.Contains("saad");
Console.Write(query);
True (because "saad" is available in List)
see this vb.net
Related Articles:
0 comments:
Post a Comment