✅ Why is an explicit cast needed even though the implicit cast operator is available?
No explicit cast is needed.
But why does the following need explicit cast even though an implicit conversion operator has been implemented?
5 Replies
I think it's because the syntax
var (x, y)
is deconstruction syntax, so it will try to call a destructorvar (x, y) =
is performing a deconstr--yeah that
it's not creating a tupleThis works:
Deconstructing tuples and other types - C#
Learn how to deconstruct tuples and other types.
Ok. Thanks.