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's the difference between abstraction and encapsulation?

0 Answers  


Can list contain duplicates c#?

0 Answers  


What is the advantage of dependency injection?

0 Answers  


What is cookies in c# asp net?

0 Answers  


Can we inherit static class in c#?

0 Answers  


Enlist some of the properties of a thread class?

0 Answers  


what is IDisposal interface,IComparable,IEquatable,IFormatable

0 Answers   Wipro,


What is equal c#?

0 Answers  


Why do we use yield in c#?

0 Answers  


What is the difference between console and windows application?

0 Answers  


What?s class SortedList underneath?

2 Answers  


What are the different types of classes?

0 Answers  


Categories