
Set Operators-Distinct
The Distinct operator eliminates duplicate elements from a sequence.
The example creates a sequence of unique factors of 300 by using the Distinct method on the integer array of factors to remove duplicates.
| using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication4 var uniqueFactors = factorsOf300.Distinct(); Console.WriteLine("Prime factors of 300:"); |
Output:
Aspnet Discussion
- - Web application
- - Great Indian Developer Su
- - Aspx page inside Silverli
- - Open aspx page inside Sil
- - Guidance for a novice




