I am wondering which parts of the System
are language features (core components), and which parts are just useful filler, but aren't strictly necessary. I may be off with the wording here, so let me illustrate with an example what I mean.
Consider System.Console
class it's obviously something that is used for something very particular. In essence, this thing is there to play nice with a feature of Windows / current OS. It's not what I would call a core component of the language.
On the other hand, take the System.IDisposable
interface. That thing's obviously very important, as without it the using()
statement is useless. A class needs to implement this particular interface for a language feature to kick in.
I could assume that the mscorlib
is the responsible party here. A quick glance with the Object explorer shows that it indeed houses many of the components I can agree are core, while at the same time it puts the Console
class into System namespace, which is just filler.
This notion of placing filler and language-specific objects into the same namespace equates them, but for a deeper understanding of C#, I would like to know which is which. So, I'm looking for a list of core components of C#. I'm assuming that there's a handy reference somewhere, but since I was asleep during the google-lecture I was unable to form the correct query to find it.
Thanks in advance.
Much later EDIT I read this Lippert blog post, it's kind-of-related. Interestingly foreach
construct doesn't actually require IEnumerable
interface to function.
There aren't very many types actually required by C#. Ones which I can think of off the top of my head and with a quick check of the spec:
Now any target framework is going to require more types than that for the implementation of course - things like MethodInfo
as mentioned in comments, probably attributes to decorate out parameters (and a whole bunch of other types for dynamic typing). But different target systems could have different implementations of that - you couldn't depend on them when writing truly portable C#.
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