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
Why do we use classes?
What is wcf c#?
Does main have to be static c#?
Assembly Code. in Rejester AL. How do Contast Replece( or Change): Bit D3 With Bit D4 and Bit D2 With Bit D5 and Bit D1 With Bit D6 and Bit D0 With Bit D7 I am Not Know Very Well Write English.
What is strong data type in c#?
Define a class and an object?
What are the commonly used i/o classes?
What is the difference between dictionary and hashtable in c#?
What are the string functions in c#?
Where are value types stored in c#?
Is c# 8 released?
Can I fly with a loop recorder?
What is difference between internal and protected internal in c#?
Are c# tuples immutable?
Is std :: string null terminated?