CSharp examples for System:String Split
Deserializes the string into a string[]
public class Main{ /// <summary> /// Deserializes the string into a string[] /// </summary> /// <param name="obj">String to deserialize</param> /// <param name="separator">Separator</param> /// <returns>String array</returns> public static string[] Deserialize(this string obj, char separator) {/*from w ww.j a va 2s . c o m*/ return string.IsNullOrEmpty(obj) ? null : obj.Split(separator); } /// <summary> /// Deserializes the string into a string[] having a ";" as a separator /// </summary> /// <param name="obj">String to deserialize</param> /// <returns>String array</returns> public static string[] Deserialize(this string obj) { return Deserialize(obj, ';'); } }