Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is escape character in c#?

971


What is readline library?

1021


Why do we use partial class in c#?

952


Can we inherit static class in c#?

1035


What are delegates and why are they required?

1046


Is c# dictionary a hash table?

959


Explain About ADO and its objects

1076


Is there regular expression (regex) support available to c# developers?

1015


Do unused Namespaces in c# affect run-time performance?

1095


What is scope c#?

925


Does c# have primitives?

927


Explain the difference between user control and custom control. Also, explain their use.

1101


How can I develop an application that automatically updates itself from the web?

952


What are handlers in c#?

998


What does console readline do?

934