List<string> lst = new List<string> { "abc", "abc", "xyz" }; int res = (from x in lst select x).Distinct().Count();
It can be something like:
List<string> myList = new List<string> {"abc", "abc", "xyz"}; int distinctCount = myList.Distinct().Count();
// my arry sting string[] filePaths = {"abc","abc","xyz"}; filePaths = filePaths.Cast<string>().Distinct().ToArray(); </string>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)