4 ms·
Tuples are a great example that I might not have thought of -- you practically "define" your own value types all the time. Also, all enum types are value types.
by codeflo 5y ago
Tuples are a great example that I might not have thought of -- you practically "define" your own value types all the time. Also, all enum types are value types. And there are lots and lots of very commonly used value types in the base class library: DateTime, TimeSpan, Guid, CancellationToken. Programmers have to be familiar with their semantics.
- throwaway894345 5y agoYeah, this makes sense. I concede that idiomatic C# uses value types sometimes, although they're more pervasive in idiomatic Go.