C# and CLR features confusion, what feature deserves to be described strictly as C# feature?

I've got to write few words about C#, generally piece of cake? No!

I've searched through various internet resources and books and what i got is kind of headache. For example Garbage Collector some sources says that this is C# feature, other that CLR got this feature and C# along with all other .NET languages got it by default. Ofcourse, my vote on CLR but there are lot other things that bring confusion, like avoiding explicit code conversions. Maybe i've got bad books and resources... so maybe someone would suggest some place where in clear way is said about C#

Second thing are origins of C# syntax, again few choices and nothing clear, other language combo by each other author. C, c++, Java, that's ok but VB6 and Delphi, i have doubts. And again features origin from these languages is mixed up with c# but in fact it is not clear if it is C# or CLR feature



GC is provided by the CLR

C# is everything that the language spec states, and no more.

Some of the more-interesting things that are actually C# features:

  • iterator blocks [yield return]
  • anonymous methods / closures / lambdas [the syntax, not to be confused with expression trees]

But anything that relates to the code you type, but which isn't directly provided by either the CLR or the framework is a language feature. Other languages may implement them too, of course...

  • using [try/finally/Dispose]
  • lock [Monitor.Enter/try/finally/Monitor.Exit]
  • foreach [GetEnumerator()/while/[Dispose]]
  • extension method resolution
  • query syntax ["where pred" to .Where(x=>pred) etc]

(these are just a few examples of course; and again - other languages are at liberty to also provide these features!)

Need Your Help

Context switches much slower in new linux kernels

linux multithreading linux-kernel kernel ubuntu-12.04

We are looking to upgrade the OS on our servers from Ubuntu 10.04 LTS to Ubuntu 12.04 LTS. Unfortunately, it seems that the latency to run a thread that has become runnable has significantly increa...

$i18nextProvider in karma test

angularjs typescript karma-jasmine

I try to run a test for a directive which uses i18next.