Page 12 : 43
Object-oriented Programming in C#
Introduction to C#
* The C# Language and System
C# seen in a historic perspective
The Common Language Infrastructure
CLI Overview from Wikipedia
C# Compilation and Execution
* C# in relation to C
Simple types
Enumerations types
Non-simple types
Arrays and Strings
Pointers and references
Structs
Operators
Commands and Control Structures
Functions
Input and output
Comments
* C# in relation to Java
C# versus Java
Types
Operations
Other substantial differences
* C# in relation to Visual Basic
The Overall Picture
The Overall Picture
Declarations and Types
Declaration and Types
Expressions and Operators
Expressions and Operators
Control Structures for Selection
Control structures for Selection
Control Structures for Iteration
Control structures for iteration
Arrays
Arrays
Procedures and Functions
Procedures and Functions
Combined C# and Visual Basic Programming
Object-oriented programming in Visual Basic
* C# Tools and IDEs
C# Tools on Windows
C# Tools on Unix
Documentation Tools
Structs
Structs in C and C# are similar to each other. But structs in C# are extended in several ways compared to C.
The concept of structs has been much extended in C#
Similarities
Structs in C# can be used almost in the same way as structs in C
Structs are
value types
in both C and C#
Differences
Structs in C# are almost as powerful as classes
Structs in C# can have operations (methods) in the same way as classes
Structs in C# cannot inherit from other structs or classes
Demonstrations of structs in C#.
Output from the struct demo program.
An extended demonstration of structs in C#.