Counting repeating numbers in an Array

前端 未结 5 1664
生来不讨喜
生来不讨喜 2020-12-22 02:53

Fairly new to C#. Have an assignment for class that asks us to generate an array from user inputted values. This part is done and work\'s perfectly.

Now that the arr

5条回答
  •  梦毁少年i
    2020-12-22 03:06

    You can use LINQ Distinct() extension method.

    http://msdn.microsoft.com/en-us/library/system.linq.enumerable.distinct.aspx

提交回复
热议问题