Forgot to commit
[mono.git] / mcs / docs / ecma334 / 14.9.7.xml
1 <?xml version="1.0"?>
2 <clause number="14.9.7" title="String equality operators">
3   <paragraph>The predefined string equality operators are: : <code_example><![CDATA[
4 bool operator ==(string x, string y);  
5 bool operator !=(string x, string y);  
6 ]]></code_example></paragraph>
7   <paragraph>Two string values are considered equal when one of the following is true: <list><list_item> Both values are null. </list_item><list_item> Both values are non-null references to string instances that have identical lengths and identical characters in each character position. </list_item></list></paragraph>
8   <paragraph>The string equality operators compare string values rather than string references. When two separate string instances contain the exact same sequence of characters, the values of the strings are equal, but the references are different. <note>[Note: As described in <hyperlink>14.9.6</hyperlink>, the reference type equality operators can be used to compare string references instead of string values. end note]</note> </paragraph>
9 </clause>