|
-
Apr 13th, 2007, 02:12 AM
#1
Re: [2.0] Float
"float" is an alias for Single. If you don't specify otherwise, any literal number with a decimal point in it is a Double. You cannot implicitly convert a Double to a Single because it is a narrowing conversion, i.e. data could be lost. If your method is expecting floats then you need to pass floats to it. To force a literal to type float you use an "F" suffix:
-
Apr 13th, 2007, 02:17 AM
#2
Thread Starter
Just Married
Re: [2.0] Float
 Originally Posted by jmcilhinney
"If your method is expecting floats then you need to pass floats to it. To force a literal to type float you use an "F" suffix
Thanks sir
It's working fine now.Can you give the list of more suffix in C# , that we have need to use in the code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|