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 .



i have a string aabccefsdss.how can i get the string abcefsd. or write the fallowing string with o..

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

Post New Answer

More C Sharp Interview Questions

How do you generate documentation from the C# file commented properly with a command-line compiler?

1 Answers  


What is ilasm.exe used for?

0 Answers  


Is it possible to have a static indexer in c#? Allowed in c#.

0 Answers  


What is the use of protected in c#?

0 Answers  


Is c# or c++ better for games?

0 Answers  


Why do we need delegates in c#?

0 Answers  


Is c# a keyword?

0 Answers  


hi my question is about understanding a text the user entered to a site , so i want to analyse that text looking for some specific items such as "honda" "shoffere" etc.. so if this site could help or could tell me where to go with such question ,i wonder. thanks

0 Answers  


What are the fundamental oop concepts?

0 Answers  


What is distribute by in hive?

0 Answers  


Can a structure inherit a class.

3 Answers   Infosys, Synechron,


Is hashset ordered c#?

0 Answers  


Categories