How do I convert a char array to string (C#)?

I have a problem. I am trying to create an on-screen keyboard, and right now I am just testing how to create a string from the characters the player inputs. Here is the code, `using UnityEngine;
using System.Collections;

public class OnScreenKeyboard : MonoBehaviour
{
%|-2027507329_1|%
%|134211281_2|%
%|703842105_3|%
%|1650434119_4|%
%|-2095084726_5|%
%|1016882716_6|%
%|-415537406_7|%
%|102902370_8|%
%|2047609155_9|%
Input[6] = ‘W’;
%|-270864002_11|%
%|-1309702685_12|%
%|-963489900_13|%
%|-641054115_14|%
%|-1870234116_15|%
%|-1626960618_16|%
}
}`

It should log the string HELLO WORLD, but it returns a nullreferenceexception.

NullReferenceException: Object reference not set to an instance of an object
OnScreenKeyboard.Start () (at Assets/Resources/Script/OnScreenKeyboard.cs:7)

If anyone one can help, I would appreciate it.

You skipped Input[9], so index 9 is null.

Try use System.Text.StringBuilder