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

How do you create empty strings in c#?

923


Is c# scripting language?

877


How many bytes is a char c#?

879


how to prevent a class from being inherited in c#.net?

974


What is namespace in oop?

925


How do destructors and garbage collection work in c#?

927


Explain how to use an extender provider in the project.

967


What is a satellite assembly in c#?

994


What is class and object c#?

897


Does unity require coding?

942


What is autopostback in c#?

948


What is difference between il and dll ?

993


How do I simulate optional parameters to com calls?

944


What is an iqueryable in c#?

917


What is mean by c#?

932