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;Loading
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;Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vishal JoshiPosted Feb 14, 2023, 8:07 AM
Hello akmal
You can try regex to mask the US Phone number. please check the below sample code.
Result:
(XXX) XXX-7890
XXX XXX 7890
(XXX) XXX- 7890
Thanks
Rajat JaiswalPosted Feb 13, 2023, 3:14 PM
Hi,
You can try string format option like
Or create a property which will return format as shown below