Language:

IsWholeNumber()

Language: Deutsch
Programming Language: C#
Published by: Thomas
Last Update: 5/4/2006
Views: 976

Description

Funktion prüft auf positive Ganzzahlen inklusive 0

Code

1 public static bool IsWholeNumber(string strNumber) { 2 try { 3 Regex objNotWholePattern=new Regex("[^0-9]"); 4 return !objNotWholePattern.IsMatch(strNumber); 5 } 6 catch { 7 return false; 8 } 9 } 10

No comments avaiable

Add a comment

Name *  

Email (won't be displayed) *    

Website  

Comment *  

Sicherheitscode Security Code *    

RSS