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
Hi Friends, I am going through Siemens Interview Procedure from last 1+1/2 months. I went through 1 written + 2 Technical + 1 Managerial Round process after which I got call from HR informing that "you are selected and we would like to meet you for HR round". HR round was very nominal compared to MR. HR Round last for hardly 5 mins. They told me that you will get the final result on Friday. Still I have not received any feedback from them. Please help!!!
What is static and use of it?
What does int parse do in c#?
Difference between a sub and a function in c#.
What is a base class in C#?
Is there throws keyword in c#?
how to compare numbers and dispaly the largest ? *first thing I wanted to do is to input how many numbers to be compared *and then analyzed the largest then display it.
if a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor?
How can I process command-line arguments?
What is difference between array and arraylist in c#?
What is using in c#?
What is array and its types in c#?
Can we have 2 main methods in c#?
What is a Command Object in C#?
Whats an assembly? Describe the importance of assembly?