views:

161

answers:

2

Hello

Currently I have a Double which looks like 12.53467345 .. Now I would like to remove the numbers after the dot so i just get "12" , how could i do this? I guess with TryParse, but don't really understand how to do it.

Thanks!

+7  A: 
System.Math.Floor()

Ref.

Mitch Wheat
Great, works fine!
A: 

or INT()

MSDN Ref

Beth
Because the decimal portion is greater than .5 Int() would actually return 13 in his example.
Bill
? That's not what I'm seeing:?int(12.53467345)12.0
Beth