Chapter 19 Working with C#
You design a C# struct using a class with the <<structure>> stereotype. A struct can implement interfaces but does not support inheritance; it can contain events, variables, constants, methods, constructors, and properties.
The following struct contains two attributes:
{ public struct Point { public int New() { return 0; } private int x; private int y; } }
Copyright (C) 2006. Sybase Inc. All rights reserved. |
![]() |