TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nathan R
NA
13
15.9k
c# code to check mobile phone number format
Mar 18 2014 7:09 AM
Sir,
I need your help to find a c# code to check the mobile phone number format with country code.
the phone number value in database column is like this:- '91XXXXXXXXXX' .
Please provide me the proper code to check the 12 digit number
the problem is in the line marked red.
My current code is:-
private static readonly Regex phoneNumber = new Regex(
@"\d{2}-\d{3}-\d{3}-\d{4}"
)
;
public static bool VerifyPhoneNumber(string pNumber)
{
return phoneNumber.IsMatch(pNumber);
}
And my function only need to execute if the format is correct.
I did:-
if(VerifyPhoneNumber(Phone))
{
}
Reply
Answers (
3
)
how to develop an application for asha nokia?
Create file