Skip to content

Commit 60e637a

Browse files
Update: Check.IsAllNumbers(string)
1 parent afb63fb commit 60e637a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Check.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,16 @@ public static bool IsAValidPhilippineMobileNumber(string str)
7575

7676
public static bool IsAllNumbers(string str)
7777
{
78+
bool value = true;
7879
string numbers = "0123456789";
7980
foreach (char a in str)
8081
{
8182
if (!numbers.Contains(a))
8283
{
83-
return false;
84+
value = false;
8485
}
8586
}
86-
return true;
87+
return value;
8788
}
8889

8990
public static bool HasNumbers(string str)

0 commit comments

Comments
 (0)