I have one string eg str="Shradha,Aparna,Aparna" So I dont want the duplicate name how I can remove it

Watever is the 2 nd same instance I just dont want it in the string

Hey,

please store these value in a variable (variable type- Array of string)
then you can use

arrVariable= arrVariable.Distinct().ToArray()

where arrVariable is a variable of Array of string variable type

Thanks

1 Like

Hi,

Can you try the following expression?

String.Join(",",yourString.Split(","c).Distinct)

Regards,

I second Rounak’s reply

1 Like