Link to home
Start Free TrialLog in
Avatar of Mannsi
Mannsi

asked on

Need to format a nullable decimal in C#

Hello experts,

I'm having what I consider a silly problem. I have a decimal? value in c# that I would like to format. It currently displays as 40.00000 but I would like to see 40.00. If the decimal value happens to be null I would like to see either a 0 or nothing.

ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial