tags:

views:

56

answers:

3

The following code is designer generated:

Me.lblXRay.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

What's the 8.0! mean?

+5  A: 

it mean type single

Fredou
+5  A: 

From the msdn library

Type Characters. Appending the literal type character F to a literal forces it to the Single data type. Appending the identifier type character ! to any identifier forces it to Single.

Mark Hall
`8.0` is a literal though, not an identifier
BlueRaja - Danny Pflughoeft
+6  A: 

This dates back to very early versions of Microsoft Basic. These type characters let you both set the type of an identifier and a literal:

    Dim singleVar! = 1.2!
    Dim doubleVar# = 1.2#
    Dim decimalVar@ = 1.2@
    Dim integerVar% = 12%
    Dim longVar& = 12&
    Dim stringVar$ = "12"

    Function ReturnsString$(ByVal takesLong&)
Hans Passant
Good old GWBASIC... :')
Matteo Italia
See also: http://msdn.microsoft.com/en-us/library/s9cz43ek%28VS.80%29.aspx
BlueRaja - Danny Pflughoeft