i have a string aabccefsdss.how can i get the string abcefsd.
or write the fallowing string with only character
occurrence of once .
Answer / 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 |
Can we create instance of private class in c#?
What are the benefits of using windows services:
What is the process of Serialization?
Define encapsulation?
What does dbml mean in texting?
What are the steps to create a webservice and consume it?
How many variables do you need?
Write down the c# syntax to catch an exception
What is predicate c#?
What is the difference between iqueryable and ienumerable?
What is icomparable in c#?
What is default access specifier for class in c#?