1

Anyone could help my why in MSDN some resources for C# are provided the list of versions (for a specific topic) as C# (1.0, 2.0, etc) and some other are provided as Visual Studio versions (2003, 2005, etc).

I've read a question and an answer provided by Jon Skeet, describes the differences but I think for example, params keyword and IEnumerable both are part of C# the language not parts of libraries in .Net.

Am I wrong?

Community
  • 1
  • 1
Homam
  • 23,263
  • 32
  • 111
  • 187
  • I'd refine it: why does the documentation equate a version of VS with a C# version? Or, why don't the docs specify the C# version instead of VS version? Yes, VS 2010 supports C# 4.0, but not exclusively. (Yes the CS 4 compiler ticks down into 3.0 compat mode when required). Likely it's down to 'friendliness'. – p.campbell Apr 19 '11 at 20:34
  • @p.campbell : Kindly edit the question if you would like. English is not my first language. Thanks. – Homam Apr 19 '11 at 20:36
  • It appears that the entire [C# reference](http://msdn.microsoft.com/en-us/library/618ayhy6.aspx) specifies Visual Studio versions. Do you have an example in the documentation that specifies C# versions? – Robert Harvey Apr 19 '11 at 20:37
  • @Robert: I guess that was my point. The docs equate C# versions with VS versions (i.e. tooling). I can't recall ever seeing MSDN docs for C# versions. I guess if it works for them, and it provides a friendlier way to get folks finding the right info, I can't fault MSDN for that. – p.campbell Apr 19 '11 at 20:40
  • @Robert: Actually .Net versions, sorry, I'll edit it. – Homam Apr 19 '11 at 20:40

2 Answers2

1

params is part of the C# language proper. IEnumerable is part of the .NET Framework.

Look at the downloadable Express versions of Visual Studio, and you will see that each version of C# is tightly tied to the version of Visual Studio that supports it, while the .NET Framework is treated as if it were an outside library (which, in certain ways, it is. It is language-agnostic, for example).

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
1

params is a C# keyword although other .NET languages may have equivalent keywords e.g. VB.NET has ParamArray.

IEnumerable is a .NET framework interface and not C# specific.

I suspect that a lot of resources on MSDN are auto-generated by some tool, similar to SandCastle. I would imagine that this tool outputs markup that includes all of Microsoft's popular modern languages.

Russ Cam
  • 124,184
  • 33
  • 204
  • 266