ASPX if Greater Than
Can anyone tell me how I can re-write this to compare to greater than rather than equal to:
if (GetSchoolOrLAID.Equals(1))
I want it to be:
if (GetSchool开发者_开发知识库OrLAID.GreaterThan(1))
Hope really appreciated..
Create an extention method with name as GreaterThan
- http://msdn.microsoft.com/en-us/library/bb383977.aspx
Can you not use the operator?
if (GetSchoolOrLAID > 1)
or am I missing something?
How about an operator?
if (GetSchoolOrLAID > 1)
You could use the .Compare()
method.
精彩评论