Where can I find the C# 5 language specification?
Asked Answered
R

2

38

C# 5.0 is out now since August 2012. Where can I find the specification? They've stopped doing ECMA specs, but how about MSDN?

Righteousness answered 20/11, 2012 at 5:27 Comment(2)
Hmm. I was going to point to this, but it looks like it still leads to the 4.0 spec right now.Champion
Nothing much anywhere about c# 5.0 but you can get some interesting facts here in this link though - codeproject.com/Articles/113752/5-nice-things-to-have-in-C-5-0Roughneck
B
18

It was originally unavailable online but since June 2013 it is available for download from Microsoft.

Betelgeuse answered 11/6, 2013 at 13:5 Comment(3)
Is there a PDF version for it?Spoke
@AminM By now it is still available only for C# 3 and C# 5Thriftless
The C# 6 specification (currently a draft) can be found here.Maimonides
G
66

If you have Visual Studio 2012 installed, you will find specification somewhere there:

c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC#\Specifications\1033\CSharp Language Specification.docx

similar with VS2013:

c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC#\Specifications\1033\CSharp Language Specification.docx

VS2015:

c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC#\Specifications\1033\CSharp Language Specification.docx
Gertrudis answered 20/11, 2012 at 5:38 Comment(7)
Be aware that for me, the document says it's “C# Language Specification Version 4.0”, but it actually is spec for C# 5.0.Macerate
@AaronAnodide: by now it's also available online, see msdn.microsoft.com/en-us/library/vstudio/ms228593.aspxCongelation
Correcting myself, the online version is not the same version you find installed with VS 2012 - even though the MSDN page makes it look like that.Congelation
@Congelation DO you know what are the differences?Macerate
@Macerate I believe the whole async/await syntax was missing (and the copyright dates differed), so the online version probably was C# 4 instead of C# 5. I've just checked it again though, and they seem to have updated it. Now I can't find any obvious differences between the online version and the copy with VS 2012 anymore.Congelation
Jon Skeet has a page about this. csharpindepth.com/articles/chapter1/Specifications.aspxCassius
VS2015: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC#\Specifications\1033\CSharp Language Specification.docxPassenger
B
18

It was originally unavailable online but since June 2013 it is available for download from Microsoft.

Betelgeuse answered 11/6, 2013 at 13:5 Comment(3)
Is there a PDF version for it?Spoke
@AminM By now it is still available only for C# 3 and C# 5Thriftless
The C# 6 specification (currently a draft) can be found here.Maimonides

© 2022 - 2024 — McMap. All rights reserved.