public static RealWorldPhone Split(string s) { string[] ss = s.Split("-".ToCharArray()); if (ss.Length != 2) { return(null); } string errMsg = ""; ushort areaCode = 0; int phone = 0; if (!ushort.TryParse(ss[0], out areaCode)) { return(null); } if (!int.TryParse(ss[1], out phone)) { return(null); } RealWorldPhone ret = RealWorldPhone.New(ref errMsg, areaCode, phone); return(ret); }
public static bool Check(RealWorldPhone phone, ref bool isMobile) { return(Check(phone.ToString(), ref isMobile)); }
public static string Combin(RealWorldPhone phone) { return(string.Format("{0}-{1}", phone.mAreaCode, phone.mPhoneNum)); }