Font size

  • Thread starter Thread starter Hexathioorthooxalate
  • Start date Start date
H

Hexathioorthooxalate

It used to be a common method of indicating/forcing a datatype in previous
incarnations of VB, or when passing values to and from the WinAPI. String
were suffixed by $; numbers being suffixed by % for a integer, & being a
long, # for a double, and a ! for a single.

Occasionally these 'special' characters have more than one use too. The !
was often used in prefix notation as well (termed 'banging' if you wanted to
Google it out).
Regards
Hexathioorthooxalate
 
Hi.

Have found some code examples with syntax like that:
RichTextBox1.Font = New System.Drawing.Font("Tahoma", 12.0!,
System.Drawing.FontStyle.Regular, _
System.Drawing.GraphicsUnit.Point, CType(0, Byte))

What is the meaning of the ! sign on the size parameter in the code above?

TIA,
Erik Cruz
 
* "Erik Cruz said:
Have found some code examples with syntax like that:
RichTextBox1.Font = New System.Drawing.Font("Tahoma", 12.0!,
System.Drawing.FontStyle.Regular, _
System.Drawing.GraphicsUnit.Point, CType(0, Byte))

What is the meaning of the ! sign on the size parameter in the code above?

"!" marks the number "12.0" as 'Single' (which is a datatype).
 
Back
Top