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 default constructor c#?
What are extender provider components? Explain how to use an extender provider in the project.
Explain code compilation in c#.
Why do we use readonly in c#?
How is the syntax written to inherit from a class in C#?Give an example ?
What is a delegate? Explain.
Can we inherit private members of class in c#?
How does one compare strings in c#?
What does f mean in c#?
Can an interface extend a class c#?
How many types of serialization are there in c#?
How can I get the ascii code for a character in c#?
What is generic delegates in c#?
What is literal control
What is entity framework c#?