dennismagno / metroframework-modern-ui

My humble attempt to bring the new Modern UI alias Metro UI of Windows 8 to .NET Windows Forms applications.
http://dennismagno.github.io/metroframework-modern-ui
Other
861 stars 1.08k forks source link

Fix float constant definition #3

Closed xamgore closed 8 years ago

xamgore commented 8 years ago
backColor = ControlPaint.Light(backColor, float.Parse("0.25"));

Seems that is not the best idea to parse floats, cause there are various cultural formats.

I get a FormatException every time mouseOver event occures, read detailed log here.

My solution is to change float.Parse("0.25") to 0.25f.

ghost commented 8 years ago

Great, simple fix. +1.

bhaveshsorathiya1 commented 8 years ago

Great,Post. & fix it.