Introduction to C#
- slide 9 : 43
Non-simple types
C# allows for a variety of non-simple types, most important Classes
Similarities
Arrays in C#: Indexed from 0. Jagged arrays - arrays of arrays
Strings in C#: Same notation as in C, and similar escape characters
Structs in C#: A value type like in C.
Differences
Arrays: Rectangular arrays in C#
Strings: No
\0
termination in C#
Structs: Much expanded in C#. Structs can have methods.
New kinds of non-simple types in C#:
Classes
Interfaces
Delegates
As an object-oriented programming language, C# is
much stronger
than C when it comes to definition of our own non-simple types
System.Enum