Aren't those characters you're using in Delphi?
In .NET you can use those two methods, to check the integer representation of the
string
. But, lets change them to characters, and you'll see that this same method works here too.
if('1' <= '2') {
Console.WriteLine("Works");
}
.. above code printed "Works" in the Console,
here[
^] give it a try yourself.
You can use them as variables too, such as
char a = '1';
char b = '2';
if(a <= b) {
Console.WriteLine("Works");
}
Wasn't it unfair of you, to use strings and not use Convert or Int.TryParse? Try this
dotnetperl[
^] link for more.