aewarnick Posted February 26, 2003 Posted February 26, 2003 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? Quote C#
aewarnick Posted February 26, 2003 Author Posted February 26, 2003 This is all I have found that works: MessageBox.Show(""+(float)Convert.ToDouble(CommunicationLog.settings.GetValue("TitleFont.Size"))); Quote C#
aewarnick Posted February 26, 2003 Author Posted February 26, 2003 Or Convert.ToSingle(CommunicationLog.settings.GetValue("TitleFont.Size") Is single a float value? Quote C#
*Gurus* divil Posted February 26, 2003 *Gurus* Posted February 26, 2003 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. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
aewarnick Posted February 26, 2003 Author Posted February 26, 2003 Ok. Now I have some new ideas. Quote C#
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.