CSharp examples for System:String Convert
Parse and convert mobile phone to format like +77015543456
using System.Text.RegularExpressions; public class Main{ /// <summary> /// Parse and convert mobile phone to format like +77015543456 /// </summary> /// <param name="phone">Mobile phone source string</param> /// <returns></returns> public static string ParseMobilePhone(string phone) {/*ww w.j a v a2 s . c o m*/ return Regex.Replace(phone, @"[^+0-9]", ""); } }