About the author

Vijay Kodali
E-mail me Send mail

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2024

Check if variable is number in C#

            string s ="45";
            int i;
            bool isNum = int.TryParse(s.ToString(), out i); 
 
            if (isNum)
                Response.Write(i); //integer 
            else
                Response.Write("Not an interger");

Categories: ASP.NET | C#
Posted by vijay on Thursday, June 18, 2009 9:27 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading