What is the official name for this syntax feature?

笑着哭i 提交于 2019-11-27 08:05:59

问题


What is the name of the character at the end of each of these lines?

Dim _int As Integer = 1I
Dim _short As Short = 1S
Dim _long As Long = 1L
Dim _single As Single = 1.0F
Dim _double As Decimal = 1D

I've always called these "type specifiers". I assume that's incorrect as I'm unable to find the official documentation using this term. I would like to know what others are available but can't find the right term to use in my search.


回答1:


According to the documentation in VB.NET they are called "literal type characters". See the section on "forced literal types".




回答2:


It's called a type suffix.




回答3:


According to MSDN in C# are called: Type suffix



来源:https://stackoverflow.com/questions/3346462/what-is-the-official-name-for-this-syntax-feature

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!