akmal husain

akmal husain

  • NA
  • 5
  • 1.2k

how to add a phone number in us format using mask for .net maui?

Feb 13 2023 1:20 PM
string temp = string.Empty;
// int i = value.Length;
if (value.Length == 3 || value.Length == 7)
{
    if (temp.Length == 0)
    {
        temp = value;
    }
    temp += "-";

}
else
{
    temp = value;
}

((Entry)sender).Text = temp;

 


Answers (2)