Can any one explain why the output of this code is only 'hello' and what this code means?
( 0, characterArray, 0, characterArray.Length );
The output is showing:
The character array is: hello
The code follows:
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 < characterArray.Length; i++ )
Console.Write( characterArray[ i ] );
Thanx in advance.