© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
27 replies
SirCarter

❔ User-defined implicit type conversion + type pattern match

Hello, if I have some type
Either<T1, T2>
Either<T1, T2>
that has a left and right variant, is there a way to get C# to use an implicit converter so that I can write:
foobar is T1 value
foobar is T1 value
?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Convert enclosing type - implicit enum conversion
C#CC# / help
2y ago
✅ CSharpFunctionalExtensions.Result implicit conversion
C#CC# / help
2y ago
Json Serializer implicit conversion
C#CC# / help
3y ago
✅ Cannot implicit convert type
C#CC# / help
3y ago