What is String.CopyTo?
<p>Can any one explain why the output of this code is only 'hello' and what this code means?</p>

<pre><code>( 0, characterArray, 0, characterArray.Length );
</code></pre>

<p>The output is showing:</p>

<p><PRE>The character array is: hello</PRE></p>

<p>The code follows:</p>

<pre><code>string string1 = "hello there";
char[] characterArray = new char[ 5 ];

string1.CopyTo( 0, characterArray, 0, characterArray.Length );
Console.Write( "\nThe character array is: " );

for ( int i = 0; i &lt; characterArray.Length; i++ )
    Console.Write( characterArray[ i ] );
</code></pre>
