How do I check if a number is positive or negative in C#?

前端 未结 17 1496
轻奢々
轻奢々 2020-12-04 05:55

How do I check if a number is positive or negative in C#?

17条回答
  •  孤街浪徒
    2020-12-04 06:14

    First parameter is stored in EAX register and result also.

    function IsNegative(ANum: Integer): LongBool; assembler;
    asm
       and eax, $80000000
    end;
    

提交回复
热议问题