Returns 0 if there is no item in the collection.

Amatya
Posted by Amatya under C# category on | Points: 40 | Views : 1133
Returns 0 if there is no item in the collection.

IEnumerable<string> dnfItems = new List<string> { };
int dnfCount = dnfItems.Count();


Result
dnfCount 0

Comments or Responses

Login to post response