I have seen some code using the :>
operator to accomplish something similar to type-casting in C#
but even though I've searched a lot online I've seen no documentation about it.
What is that operator used for?
How does it work?
Where can I find some documentation about it?
:>
is the upcast operator. It's used to cast upward in an hierarchy so it's a type of casting that can be verified at compile time.
Its counterpart :?>
is the downcast operator but the success of this can only be resolved at runtime.
See this page for more details: https://msdn.microsoft.com/visualfsharpdocs/conceptual/casting-and-conversions-[fsharp]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With