On Thu, 07 Jul 2005 03:26:50 -0700, Luis Ferrao wrote:
Yes i'm talking about the numbers as i type them in visual studio's text
editor.
In C# if i type 1e3 it stays that way but in VB 1e3 turns into 1000.0
Isn't there a way to configure the formating rules?
Tools / Options / Text Editor / Basic / VB Specific
Unselect "Pretty listing (reformatting) of code"
You will lose the other functions of pretty listing:
* Align your code to the correct tab position
* Recase keywords, variables, and objects to the correct case
* Add a missing Then to an If...Then statement
* Add parenthesis to function calls
* Add missing end quotes to strings
* Reformat exponential notation
* Reformat dates
And if you ever type control-K control-D to force it to reformat, it will
change 1e3 to 1000.0 at that time too.
You could always do something like this:
Dim N as Single = "1e3"
and let the implicit CSng() happen. I believe when compiled it would
optimize the same. Even if not, it's a pretty small penalty.