c# - System.Convert.ToSingle(value) always throws FormatException -


i have several strings need convert float. when try so, using system.convert.tosingle(mystring), formatexception.

i have tried creating strings "12.123", make sure numbers okay, again got exception. question is, correct format then? in format should number in string be?

example of 1 of many strings convert: 50.105128

it down system's culture may set using , separator. setting format invariantculture use . separator.

convert.tosingle("12.123", cultureinfo.invariantculture) 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -