Introduction to C#
- slide 12 : 43
Structs
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#.