summaryrefslogtreecommitdiff
path: root/doc/manual/structs.xml
blob: 378cdea314605603109844090530bc0c982bfe21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0"?>
<section id="structs">
	<h>Structs</h>
	<p>A struct is a data type that can contain fields, constants, and methods.</p>
	<section id="declaration">
		<h>Struct declarations</h>
		<p>The simplest struct declaration looks like this:</p>
		<blockcode>
struct StructName {
	&lt;struct-member&gt;
}</blockcode>
		<p>You may optionally specify an accessibility modifier. Structs support <code>public</code> and <code>private</code> 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.</p>
		<blockcode>
public struct StructName {
	&lt;struct-member&gt;
}</blockcode>
		<p>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.</p>
		<blockcode>
struct NamespaceName.StructName {
	&lt;struct-member&gt;
}</blockcode>
	</section>
	<section id="fields">
		<h>Fields</h>
		<p>Documentation</p>
	</section>
	<section id="methods">
		<h>Methods</h>
		<p>Documentation</p>
	</section>
	<section id="properties">
		<h>Properties</h>
		<p>Documentation</p>
	</section>
</section>