VB.NET 中的感叹号 (!) [英] Exclamation point (!) in VB.NET
本文介绍了VB.NET 中的感叹号 (!)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下代码是设计器生成的:
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))
8.0!
是什么意思?
推荐答案
这可以追溯到 Microsoft Basic 的早期版本.这些类型字符允许您设置标识符和文字的类型:
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&)
这篇关于VB.NET 中的感叹号 (!)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文