Add a more functional (i.e. fewer-stubs) implementation of System.Data.Linq.
[mono.git] / mcs / docs / ecma334 / 13.xml
1 <?xml version="1.0"?>
2 <clause number="13" title="Conversions">
3   <paragraph>A conversion enables an expression of one type to be treated as another type. Conversions can be implicit or explicit, and this determines whether an explicit cast is required. <example>[Example: For instance, the conversion from type <keyword>int</keyword> to type <keyword>long</keyword> is implicit, so expressions of type <keyword>int</keyword> can implicitly be treated as type <keyword>long</keyword>. The opposite conversion, from type <keyword>long</keyword> to type <keyword>int</keyword>, is explicit and so an explicit cast is required. <code_example><![CDATA[
4 int a = 123;  
5 long b = a;     // implicit conversion from int to long  
6 int c = (int) b;  // explicit conversion from long to int  
7 ]]></code_example>end example]</example> Some conversions are defined by the language. Programs may also define their own conversions (<hyperlink>13.4</hyperlink>). </paragraph>
8 </clause>