Feb 26, 2003 #1 A aewarnick Senior Contributor Joined Jan 29, 2003 Messages 1,031 I can't seem to do anything with float! I cannot even seem to convert a float value into a string or vice versa. Can someone help?
I can't seem to do anything with float! I cannot even seem to convert a float value into a string or vice versa. Can someone help?
Feb 26, 2003 #2 A aewarnick Senior Contributor Joined Jan 29, 2003 Messages 1,031 This is all I have found that works: MessageBox.Show(""+(float)Convert.ToDouble(CommunicationLog.settings.GetValue("TitleFont.Size")));
This is all I have found that works: MessageBox.Show(""+(float)Convert.ToDouble(CommunicationLog.settings.GetValue("TitleFont.Size")));
Feb 26, 2003 #3 A aewarnick Senior Contributor Joined Jan 29, 2003 Messages 1,031 Or Convert.ToSingle(CommunicationLog.settings.GetValue("TitleFont.Size") Is single a float value?
Feb 26, 2003 #4 D divil Ultimate Contributor Joined Nov 17, 2002 Messages 2,746 Location England If you opened your help file, you would find that the C# float type maps to the Single type in the framework. You can use Single.Parse to convert a string to a Single, and use the ToString method on a Single instance to convert it to a string.
If you opened your help file, you would find that the C# float type maps to the Single type in the framework. You can use Single.Parse to convert a string to a Single, and use the ToString method on a Single instance to convert it to a string.
Feb 26, 2003 #5 A aewarnick Senior Contributor Joined Jan 29, 2003 Messages 1,031 Ok. Now I have some new ideas.