Skip to content
Discussion options

You must be logged in to vote

From:
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/type-testing-and-cast#as-operator

The as operator considers only reference, nullable, boxing, and unboxing conversions. You can't use the as operator to perform a user-defined conversion. To do that, use a cast expression.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@CaryCatZ
Comment options

Answer selected by CaryCatZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants