Results 1 to 4 of 4

Thread: [RESOLVED] How to Validate if it contains integer.

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2007
    Posts
    27

    Resolved [RESOLVED] How to Validate if it contains integer.

    I have an single dimensional array of Strings.

    Eg:

    Arr[0] = "124124"
    Arr[1] = "42314"
    Arr[2] = "as35"
    etc.

    I will have to return true if the string contained in the array is an interger. That means

    Arr[0] returns True
    Arr[1] returns True
    Arr[2] returns False.

    Any suggestions are welcome. Please guide me.

  2. #2
    Fanatic Member
    Join Date
    Aug 2006
    Location
    In my head
    Posts
    913

    Re: How to Validate if it contains integer.

    Check out Integer.TryParse - there is alot of examples on the forums here.

    D
    Platforms of choice: Visual Studio 2005/2008 Professional : Visual Studio 2010 Enterprise : PHP - Notepad++/WAMP

    Please Rate If I helped you.
    Please remember to mark threads as closed if your issue has been resolved.

    Reserved Words in Access | Connection Strings

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 2007
    Posts
    27

    Re: How to Validate if it contains integer.

    Thank you so much. I am really sorry for not having searched the forum first.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Sep 2007
    Posts
    27

    Re: [RESOLVED] How to Validate if it contains integer.

    REPS added as gratitude and for your fast response.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width