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 |
Are value types sealed?
What is the process of Serialization?
What is a string? What are the properties of a string class?
What is the minimum size (in bytes) of string data type in c#? Give its compatible data type in .NET Framework.
What are the types of operator?
What is boolean method?
What is a class level variable in c#?
How can we sort an array in c#?
What is parallel foreach in c#?
Which is the best institute in hyderabad to learn Sharepoint Portal?
What is the signature of a method?
Why do we need abstraction in c#?