Click here to Skip to main content
15,880,972 members
Articles / Programming Languages / C#
Alternative
Tip/Trick

Validate numeric textbox using int.tryparse visual C#.NET

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
23 Sep 2011CPOL 11.7K   1   3
using Microsoft.VisualBasic;// Codebool result = Information.IsNumeric("123");
C#
using Microsoft.VisualBasic;

// Code

bool result = Information.IsNumeric("123");

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Student
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralRe: thank you for that Pin
Aria Wijaya4-Oct-11 16:21
Aria Wijaya4-Oct-11 16:21 
GeneralI dont quite follow pranav95, please elaborate, this is a ps... Pin
Aria Wijaya24-Sep-11 16:47
Aria Wijaya24-Sep-11 16:47 
GeneralRe: Okay. IsNumeric checks if the given string contains only nu... Pin
Anshul R27-Sep-11 16:45
Anshul R27-Sep-11 16:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.