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 a nullreferenceexception?
3. Use layered architecture for coding. s.no name description 1 abc xxxxxxxxx 2 abc xxxxxxxxx 3 4 5 6 7 8 Select all Clear all Add Delete Name Description Save close
What is a three-tier application.
Is c# a backend language?
Define an abstract class?
What is deferred execution in c#?
Are c# strings null terminated?
What is routing in c#?
Explain About delegates
What are accessors?
What is the different types of private assembly and shared assembly?
Why do we use constructors in c#?
What are tuples c#?
Can you create sealed abstract class in c#?
what are the contents of an assembly ?