What is the official name for this syntax feature?

2019-01-20 13:43发布

问题:

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