开发者

ASPX if Greater Than

开发者 https://www.devze.com 2023-03-07 03:51 出处:网络
Can anyone tell me how I can re-write this to compare to greater than rather than equal to: if (GetSchoolOrLAID.Equals(1))

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消