I have a list of string having currencies in it, for example the size is 1000. I want list if string of all the unique currencies out of 1000 records.
Now its like –
INR
USD
JPY
USD
USD
INR
and I want List of string like –
INR
USD
JPY
only unique record
Preferably without using Linq
EDIT:
I missed the part “preferably without using LINQ”,
You may try the following if you are using .Net framework 2.0 or you don’t want to use LINQ.
useDistinct()The
uniqueListwill contain3items"abc","ab","def"Remember to include:
using System.Linq;at the top