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

Is c# and c sharp same?

0 Answers  


what are the different ways to cleaning up objects?

2 Answers   Wipro,


what is the difference between arraylist and hash table using a simple program?

3 Answers   CGI, Polaris, SunGard,


What?s the difference between the Debug class and Trace class?

2 Answers   Siebel,


What is data binding with example?

0 Answers  


How to call a function when a class implements 2 interfaces and function is present in both interfaces?

2 Answers  


How big is an int16?

0 Answers  


List the different stages of a thread?

0 Answers  


Does a class need a constructor c#?

0 Answers  


Explain the difference between directcast and ctype.

0 Answers  


What is unmannaged code and will CLR handle this kind of code or not .

0 Answers   DELL,


Explain ACID rule of thumb for transactions.

3 Answers  


Categories