... Part I, C# 1. 0,” includes Chapters 1 18 and describes the C# 1. 0
language, as delivered in Visual Studio .NET 2002 and 2003. Part II, C# 2.0,” includes
Chapters 19 –23 and describes the four ... October 10 , 2003 7:35 PM
1
Part I
C# 1. 0
Hejlsberg.book Page 1 Friday, October 10 , 2003 7:35 PM
xiii
Preface
The C# project started almost five years ago, in Decembe...
... in
Jacobi
in Section 16 .3 uses the
length
method. Show
how to
rewrite
the
code
in the
following
ways
so as not to use the
length
method.
16 .9
16 .10
16 .11
Change the interface to the
terminate
... visit the four cities in the
following order:
(1, 2, 3, 4), (1, 2, 4, 3), (1, 3, 2, 4),
(1,
3, 4,
2), (1,
4, 2,
3), (1,
4, 3, 2)
In the traveling salesma...
... 255
16
ushort
0 65,535
32
uint
0 4,294,967,295
64
ulong
0 18 ,446,744,073,709,5 51, 615
Floating
point
32
float
1. 5 × 10
–45
to 3.4 × 10
38
, 7-digit precision
64
double
5.0 × 10
–324
to 1. 7 × 10
308
, ... header
that specifies the attributes and modifiers of the class, the name of the class, the base class (if
any), and the interfaces implemented by the class....
... October 10 , 2003 7:35 PM
1. 6 Classes and Objects
21
1. Introduction
In the following example, each instance of the Color class has a separate copy of the r, g,
and b instance fields, but there is ... of the class in the same way
as an array
Events The notifications that can be generated by the class
Operators The conversions and expression operators supported by the cl...
... array.
int[] a1 = new int [10 ];
int[,] a2 = new int [10 , 5];
int[,,] a3 = new int [10 , 5, 2];
The a1 array contains 10 elements, the a2 array contains 50 (10 × 5) elements, and the a3
array contains 10 0 (10 ... operation specifies the length of the new array
instance, which is then fixed for the lifetime of the instance. The indices of the elements of
an array range from...
... to the given values before the attribute instance is returned.
Hejlsberg.book Page 43 Friday, October 10 , 2003 7:35 PM
1. Introduction
42
1. Introduction
1. 12 Attributes
Types, members, and other ... is that the referenced method has the same
parameters and return type as the delegate.
Hejlsberg.book Page 41 Friday, October 10 , 2003 7:35 PM
1. 10 Enums
39
1. Introduction...