[hpsdr] KK Locale specific conversions...

Phil Harman phil at pharman.org
Mon Jun 8 17:47:48 PDT 2009


> ***** High Performance Software Defined Radio Discussion List *****
>
> Jeeeeze...  This is how you do it:
>
> -----------------------------------------------------------------------
> float foo = 1.5f;
>
> string strfoo = foo.ToString("f3",
> System.Globalization.NumberFormatInfo.InvariantInfo);
>
> -----------------------------------------------------------------------
>
> string foostr = "1,2";
>
> float floatfoo = Convert.ToSingle(foostr ,
> System.Globalization.NumberFormatInfo.InvariantInfo)
>
> -----------------------------------------------------------------------
>
> NumberFormatInfo..::.InvariantInfo Property
>
> Gets the default read-only NumberFormatInfo that is
> culture-independent (invariant).
>
> Phil N8VB
> _______________________________________________
> HPSDR Discussion List
> To post msg: hpsdr at openhpsdr.org
> Subscription help:
> http://lists.openhpsdr.org/listinfo.cgi/hpsdr-openhpsdr.org
> HPSDR web page: http://openhpsdr.org
> Archives: http://lists.openhpsdr.org/pipermail/hpsdr-openhpsdr.org/
>
>


Thanks Phil, tested, working and implemented in V1.0.1 out this week.

73's Phil...VK6APH



 1244508468.0


More information about the Hpsdr mailing list