开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜