docs
docs copied to clipboard
CType is referred to as a function. Isn't it an operator ?
I think the CType is an operator, not a function.
Same thing applies to these articles:
- https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/functions/conversion-functions
- https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/functions/type-conversion-functions
Please, correct me if I'm mistaken. Once this issue is reviewed, I can work on fixing it if I'm correct.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: ab1603f5-5c9e-3c0c-50aa-5efe3b5bb8e1
- Version Independent ID: 2a1c48e5-5fd4-0991-2948-b2b73bdec3de
- Content: CType Function - Visual Basic
- Content Source: docs/visual-basic/language-reference/functions/ctype-function.md
- Product: dotnet-visualbasic
- GitHub Login: @KathleenDollard
- Microsoft Alias: kdollard
ping @KathleenDollard What do you think should change here?
It looks like CType
is classified as an expression in the VB specification.
ping @KathleenDollard
This issue has been closed as part of the issue backlog grooming process outlined in #22351.
That automated process may have closed some issues that should be addressed. If you think this is one of them, reopen it with a comment explaining why. Tag the @dotnet/docs
team for visibility.
@BillWagner I think this one still needs to be re-opened. Probably also worth seeking help from the compiler team for the correct term. Tagging @CyrusNajmabadi @AlekseyTs for this.
If we are talking about expressions that convert types, it looks like specification refers to them as Cast Expressions: "A cast expression coerces an expression to a given type. Specific cast keywords coerce expressions into the primitive types. Three general cast keywords, CType, TryCast and DirectCast, coerce an expression into a type."
There is a single reference to "CType operator" in the specification which is used to refer to overloading a conversion operator. I didn't find references to "CType function" in the specification. It is quite possible that this is a term used by VB6.