Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Download
Standard view
Full view
of .
Add note
Save to My Library
Sync to mobile
Look up keyword
Like this
8Activity
×
0 of .
Results for:
No results containing your search query
P. 1
C# Language Specification

C# Language Specification

Ratings: (0)|Views: 1,033|Likes:
Published by api-3835335

More info:

Published by: api-3835335 on Oct 18, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, DOC, TXT or read online from Scribd
See More
See less

03/18/2014

pdf

text

original

C#
Language Specification
Version 1.1.03
Copyright\u00a9 Microsoft Corporation 1999-2002. All Rights Reserved.
Please send corrections, comments, and other feedback tosharp@microsoft. com
12345678912
Notice
\u00a9 1999-2002 Microsoft Corporation. All rights reserved.
Microsoft, Windows, Visual Basic, Visual C#, and Visual C++ are either registered trademarks or trademarks of Microsoft
Corporation in the U.S.A. and/or other countries/regions.
Other product and company names mentioned herein may be the trademarks of their respective owners.
Copyright\u00a9 Microsoft Corporation 1999-2002. All Rights Reserved.
123453
Table of Contents
Table of Contents
1. Introduction.............................................................................................................................................. .......1
1.1 Getting started........................................................................................................................ .....................1

1.2 Types....................................................................................................................................... ....................2 1.2.1 Predefined types................................................................................................................................ ....4 1.2.2 Conversions................................................................................................................... .......................6 1.2.3 Array types...................................................................................................................................... ......6 1.2.4 Type system unification................................................................................................. .......................8

1.3 Variables and parameters............................................................................................................. ................9
1.4 Automatic memory management................................................................................................ ...............13

1.5 Expressions............................................................................................................................................... .15
1.6 Statements........................................................................................................................... ......................16
1.7 Classes................................................................................................................................................ .......19
1.7.1 Constants................................................................................................................ ............................22
1.7.2 Fields......................................................................................................................... .........................22
1.7.3 Methods......................................................................................................................... .....................23
1.7.4 Properties............................................................................................................................ ................24
1.7.5 Events........................................................................................................................... ......................25
1.7.6 Operators................................................................................................................ ............................26
1.7.7 Indexers................................................................................................................... ...........................28
1.7.8 Instance constructors..................................................................................................................... ......29
1.7.9 Destructors................................................................................................................................ ..........30
1.7.10 Static constructors.................................................................................................................. ...........30
1.7.11 Inheritance............................................................................................................ ............................31
1.8 Structs..................................................................................................................................................... ...32
1.9 Interfaces.................................................................................................................................... ...............33
1.10 Delegates................................................................................................................................. ................35
1.11 Enums.............................................................................................................................................. ........36

1.12 Namespaces and assemblies............................................................................................... .....................36 1.13 Versioning............................................................................................................................................. ...38 1.14 Attributes................................................................................................................................. ................40

2. Lexical structure................................................................................................................ ...........................42

2.1 Programs........................................................................................................................ ...........................42
2.2 Grammars...................................................................................................................................... ............42
2.2.1 Grammar notation............................................................................................................... ................42
2.2.2 Lexical grammar.................................................................................................................. ...............43
2.2.3 Syntactic grammar.......................................................................................................... ....................43
2.3 Lexical analysis........................................................................................................................ .................43
2.3.1 Line terminators...................................................................................................................... ............44
2.3.2 White space.................................................................................................................................. .......44
2.3.3 Comments.............................................................................................................................. .............45
2.4 Tokens................................................................................................................................ .......................46

2.4.1 Unicode character escape sequences....................................................................................... ............46

2.4.2 Identifiers................................................................................................................................... .........47
2.4.3 Keywords................................................................................................................................... .........49
2.4.4 Literals.................................................................................................................................. ..............49
2.4.4.1 Boolean literals........................................................................................................................ .....49
2.4.4.2 Integer literals........................................................................................................................... ....50
2.4.4.3 Real literals................................................................................................................................. ..51

Copyright\u00a9 Microsoft Corporation 1999-2002. All Rights Reserved.
iii
4123456789
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
495

Activity (8)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
Vũ Tĩnh liked this
apgwamg liked this
guriya2010 liked this
mazensaad liked this
Thodan liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->