i have a string aabccefsdss.how can i get the string abcefsd.
or write the fallowing string with only character
occurrence of once .
Answer Posted / dinesh
string s = "aabccefsdss";
char[] a = s.ToCharArray();
string d="";
foreach (char c in a)
{
if (!d.Contains(c.ToString()))
{
d = d + c;
}
}
MessageBox.Show(d);
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
How do you create empty strings in c#?
Is c# scripting language?
How many bytes is a char c#?
how to prevent a class from being inherited in c#.net?
What is namespace in oop?
How do destructors and garbage collection work in c#?
Explain how to use an extender provider in the project.
What is a satellite assembly in c#?
What is class and object c#?
Does unity require coding?
What is autopostback in c#?
What is difference between il and dll ?
How do I simulate optional parameters to com calls?
What is an iqueryable in c#?
What is mean by c#?