How do I do string1 >= string2 in Linq to SQL?
If you're looking for =>
which would normally be written as >=
then you cannot do this directly with strings. You can get the same behaviour via CompareTo:
string1.CompareTo(string2) >= 0
In this case, the result being less than or equal to zero means that string1
would be sorted before string2
and therefore is greater.
FYI the =>
operator in C# is only used in the definition of lambda expressions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With