03 April 2008

C# : Convert char[] to string

I was simply astonished to see that there is no built-in function for conversion of a char[] to string in C#. Following is a tricky way for this-

char[] myCharArray = { 'a','l','o','r',' ','c','h','h','o','t','a'};

string myString = new string(myCharArray);


© 2007 t!ps n tr!cks: April 2008

Template unik dari rohman

---[[ Skip to top ]]---