I have a code like
string code = \"AABBDDCCRRFF\";
In this code, I want to retrieve only distinct characters
The Output should be l
Linq's Distinct returns distinct elements from a sequence. As the String class implements IEnumerable, Distinct in this context returns an IEnumerable containing all of the unique characters in the string.
String
IEnumerable
Distinct
code.Distinct();