A simple if condition problem.


hi all,

i’m working on visual studio 2010 c#

i’ve got following code:

const int intmax = int32.maxvalue;

float tempval = convert.toint64(value);

if (tempval >= intmax)

{

.

.

.

.

}

my problem that: intmax = 0x 7fffffff , tempval = 1052379000 dosen’t fall on if condition.

i don’t understand why?

and how can fix it?

thanks,

shimon.

you're saying yourself, intmax 0x7fffffff (in base 16) (roughly 2 * 10^9 (in base 10)) , tempval 1 * 10^9 (in base 10) condition tempval greater or equal intmax return false (hence not entering if part)

forgive writing, english isn't native language.



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

How to Share webservice object to all user