A struct is a data type that can contain fields, constants, and methods.
The simplest struct declaration looks like this:
struct StructName { <struct-member> }
You may optionally specify an accessibility modifier. Structs support public
and private
accessibility and default to private if you don't specify one. Public structs may be accessed from outside the library or application they are defined in.
public struct StructName { <struct-member> }
You may optionally prefix the struct name with a namespace name. This places the struct in the specified namespace without the need for a separate namespace declaration.
struct NamespaceName.StructName { <struct-member> }
Documentation
Documentation
Documentation