- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
// todo '+1' is temporary
private string CorrectPhoneNumber(string phoneNumber, string countryCode = "+1")
{
if (phoneNumber.Substring(0, 1) != "+")
{
return string.Format("{0}{1}", phoneNumber.Length == 10 ? countryCode : "+", phoneNumber);
}
return phoneNumber;
}
Комментарии (10) RSS