How to check string object and with this (var list = (from x in eb.registrations select x.Name.ToString()).ToList();)
Esp: I want to check one string element is included or not in var list .
Can anyone help me in my problem?
Thanks a lot for viewing my post :-)

Manoj BhoirPosted May 13, 2015, 1:18 AM
I think you can use Contains and Exist methods on a List
See this example :
var list = new List
list.Add("cat");
list.Add("dog");
list.Add("moth");
// 2. Search for this element.
if (list.Contains("dog"))
{
Console.WriteLine("dog was found");
}
For more details check this link :
List
https://msdn.microsoft.com/en-us/library/bhkz42b3%28v=vs.110%29.aspx