Alex Rivera | Logout

Exclamation(!) operator used on a number in vb.net, what does this do?

Asked 2011-07-18T12:35:54.203
10

I'm looking at inherited code and I found this in a vb.net windows form:

New System.Drawing.SizeF(6.0!, 13.0!)

My question is, what is the significance of the ! (exclamation) operator here? Most of my searching for the exclamation operator ends up returning recordset format or the ! gets ignored in the search and I get hundreds of unrelated items.

Edit
Report

1 Answer

4

In this case, the ! stands for Single:

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.

(emphasis mine)

answered 2011-07-18T12:40:23.543

Your Answer