Add a more functional (i.e. fewer-stubs) implementation of System.Data.Linq.
[mono.git] / mcs / docs / ecma334 / 11.1.xml
1 <?xml version="1.0"?>
2 <clause number="11.1" title="Value types">
3   <paragraph>A value type is either a struct type or an enumeration type. C# provides a set of predefined struct types called the simple types. The simple types are identified through reserved words. <grammar_production><name><non_terminal where="11.1">value-type</non_terminal></name> : <rhs><non_terminal where="11.1">struct-type</non_terminal></rhs><rhs><non_terminal where="11.1">enum-type</non_terminal></rhs></grammar_production><grammar_production><name><non_terminal where="11.1">struct-type</non_terminal></name> : <rhs><non_terminal where="10.8">type-name</non_terminal></rhs><rhs><non_terminal where="11.1">simple-type</non_terminal></rhs></grammar_production><grammar_production><name><non_terminal where="11.1">simple-type</non_terminal></name> : <rhs><non_terminal where="11.1">numeric-type</non_terminal></rhs><rhs><keyword>bool</keyword></rhs></grammar_production><grammar_production><name><non_terminal where="11.1">numeric-type</non_terminal></name> : <rhs><non_terminal where="11.1">integral-type</non_terminal></rhs><rhs><non_terminal where="11.1">floating-point-type</non_terminal></rhs><rhs><keyword>decimal</keyword></rhs></grammar_production><grammar_production><name><non_terminal where="11.1">integral-type</non_terminal></name> : <rhs><keyword>sbyte</keyword></rhs><rhs><keyword>byte</keyword></rhs><rhs><keyword>short</keyword></rhs><rhs><keyword>ushort</keyword></rhs><rhs><keyword>int</keyword></rhs><rhs><keyword>uint</keyword></rhs><rhs><keyword>long</keyword></rhs><rhs><keyword>ulong</keyword></rhs><rhs><keyword>char</keyword></rhs></grammar_production><grammar_production><name><non_terminal where="11.1">floating-point-type</non_terminal></name> : <rhs><keyword>float</keyword></rhs><rhs><keyword>double</keyword></rhs></grammar_production><grammar_production><name><non_terminal where="11.1">enum-type</non_terminal></name> : <rhs><non_terminal where="10.8">type-name</non_terminal></rhs></grammar_production></paragraph>
4   <paragraph>All value types implicitly inherit from class object. It is not possible for any type to derive from a value type, and value types are thus implicitly sealed (<hyperlink>17.1.1.2</hyperlink>). </paragraph>
5   <paragraph>A variable of a value type always contains a value of that type. Unlike reference types, it is not possible for a value of a value type to be null, or to reference an object of a more derived type. </paragraph>
6   <paragraph>Assignment to a variable of a value type creates a copy of the value being assigned. This differs from assignment to a variable of a reference type, which copies the reference but not the object identified by the reference. </paragraph>
7 </clause>