Dell Mercant

Dell Mercant

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

how to round a number to a specific decimal? Dec. 1, 2015, 2:45 a.m.

float

float f = 10.123456F;
float fc = (float)Math.Round(f * 100f) / 100f;

Double

Double d = 100.123456;
Double dc = Math.Round((Double)d, 2);

Decimal

decimal d = 100.123456M;
decimal dc = Math.Round(d, 2);

More about….Math.Round Method [net-informations.com]

Jeryy