Masterminds dotnet
Showing posts with label
LINQ
.
Show all posts
Showing posts with label
LINQ
.
Show all posts
Friday, 25 January 2013
To count numbers of specified values in an array using LINQ.
To count numbers of specified values in an array using LINQ.
string
[] str = {
"AA"
,
"DD"
,
"CC"
,
"DD"
,
"EE"
,
"FF"
,
"GG"
,
"AA"
,
"KK"
,
"DD"
};
int
nCount = str.Count(m => m.Equals(
"DD"
));
Older Posts
Home
Subscribe to:
Posts (Atom)