4 ms·
> Microsoft did not seal it because sometimes you might want to create a class that has a friendlier name I expect multiple-language support may have been a st
by EdwardDiego 13y ago
> Microsoft did not seal it because sometimes you might want to create a class that has a friendlier name
I expect multiple-language support may have been a stumbling block here but compromising your API (instead of sealing the class, document it as "you shouldn't subclass this") for something that could be done with type aliasing seems like a really bad trade-off. Is the C# using keyword a johnny come lately, or would it not support this functionality?
- seanmcdirmid 13y agoYep: using MyList = List<MyThing>; The only limitation is that you can't alias generic types, just fully instantiated ones.