Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The TryCast
operator is used with a value type for at least one of the arguments.
TryCast
tests for an inheritance or implementation relationship between the two arguments. Therefore, it allows only reference types for the arguments. For more information, see Value Types and Reference Types.
Error ID: BC30792
To correct this error
- Use
DirectCast
orCType
to perform the conversion. They both allow value types.
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.