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
What is escape character in c#?
What is readline library?
Why do we use partial class in c#?
Can we inherit static class in c#?
What are delegates and why are they required?
Is c# dictionary a hash table?
Explain About ADO and its objects
Is there regular expression (regex) support available to c# developers?
Do unused Namespaces in c# affect run-time performance?
What is scope c#?
Does c# have primitives?
Explain the difference between user control and custom control. Also, explain their use.
How can I develop an application that automatically updates itself from the web?
What are handlers in c#?
What does console readline do?