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

Does C# supports multi-dimensional arrays ?

4 Answers   Microsoft,


Explain how do I get deterministic finalization in c#?

0 Answers  


What are the applications of c#?

3 Answers  


What is difference between Enum and Struct?

0 Answers   UGC Corporation,


What are object pooling and connection pooling and difference between them?

0 Answers  


What is integer c#?

0 Answers  


Will finally block get executed if the 1exception had not occurred?

3 Answers  


Is int reference type c#?

0 Answers  


Can hashtable have duplicate keys in c#?

0 Answers  


What is polymorphism and its types in c#?

0 Answers  


Types of polymerphism and explain about dynamic polymerphism?

5 Answers  


If I want to override a method 1 of class A and in class b then how do you declare ?

4 Answers   MMTS,


Categories