In C#, is there a type that can hold one of multiple types? I think this is called typesafe union. I am looking for a C# type that is similar to the C++ type std::variant
.
Asked
Active
Viewed 63 times
1

pschill
- 5,055
- 1
- 21
- 42
-
1https://stackoverflow.com/questions/3151702/discriminated-union-in-c-sharp – DavidG May 14 '20 at 09:30