Write a program in C# to display the number and frequency of number from given array in LINQ Query
belongs to collection: All LINQ programs in C# with examples
All Answers
total answers (1)
belongs to collection: All LINQ programs in C# with examples
total answers (1)
I have used Visual Studio 2012 for debugging purpose. But you can use any version of visul studio as per your availability.
Result:
The numbers in the array are :
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 4, 5, 2, 3, 10
The number and the frequency are :
Number 1 appears 1 times
Number 2 appears 2 times
Number 3 appears 2 times
Number 4 appears 2 times
Number 5 appears 2 times
Number 6 appears 1 times
Number 7 appears 1 times
Number 8 appears 1 timesNumber 9 appears 1 times
Number 10 appears 2 times
need an explanation for this answer? contact us directly to get an explanation for this answer