public string[]getunique string(string[] input)
{
input string string should have a dublicate ..want out put sting with out a dublicate ..can anyone tell me the code
2. generics string list=new geneics string list ()
list1.add(jogn)
list2.add(smith)
list3.add(jogn)
i dont want dublicate in list also ..tell me how can i write the code with out dublicate?

You can use the Distinct extension method.

public string[] GetUniqueStrings(string[] input) {
    return input.Distinct().ToArray();
}

You can do the same for a List<string> , only use ToList() instead of ToArray() .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.