I have made my custom In extension method as shown below:
public static class ExtensionMethods
{
public static bool In(this string str, IEnumerable<String> list)
{
foreach (var s in list)
{
if (s.Equals(str)) return true;
}
return false;
}
}
And now I like to use it with my LINQ query. What can I do and how do I use it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…