In order to check if strings is positive integer I used following check in C#
String maxRecords;
if (maxRecords == "" || !maxRecords.All(Char.IsDigit))
{
// Logic to implement when string contains no valid postive integer.
}
No comments:
Post a Comment