c# - Function to return list of strings starting with a character -


i want write function taking list of strings , character, returns list of strings start character.

public list<string> sort(list<string> mylist, char mychar) {   //this format want } 

something should work described:

public list<string> sort(list<string> thelist, char thechar) {     list<string> output = new list<string>();      foreach(string s in thelist)     {         if (s.startswith(thechar.tostring()))         {             output.add(s);         }     }      return output; } 

don't want sound harsh, if cant implement code yourself, under qualified job.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -