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

What is console used for?

0 Answers  


Hi, Can we implement the Abstract class on interface in c#, If yes then provide the code implementation

1 Answers   RHR, Wipro,


What is static classes in c#?

0 Answers  


What is a deadlock lock?

0 Answers  


What is a protected class c#?

0 Answers  


What is Interface Polymorphism?with E.g

1 Answers  


How do you create multiple inheritance in C#?

5 Answers   Infosys, KenIndia, Microsoft,


How do I create a delegate/multicastdelegate?

0 Answers  


What namespaces are necessary to create a localized application?

2 Answers   Rolta, Siebel Systems, Visual Soft,


What are anonymous types in c#?

0 Answers  


Explain the role of the datareader class in ado.net connections?

0 Answers  


What is the default value of datetime in c#?

0 Answers  


Categories