I have a problem with my C# project.

Suppose I have a textbox1 as follow (n rows x n columns):

```
0 1 0 1 0 1 0 1
0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0

```

Now I want to transfer data from this text box into an existed 2d Matrix that will store data in Integer Type.

I tried this but it seem to not works:

```
private void GETNUMERICDATA()
{
    string txt = textbox1.text;
    txt = txt.Replace(" ", string.Empty);   
    for (int k = 0; k < 32; k++)
    {
        for (int l = 0; l < 32; l++)
        {
            for (int i = 0; i < txt.Length; i++)
            {
                char chr = txt[i];
                if (chr == '0')
                {
                    Matrix[k, l] = (int)char.GetNumericValue('0');
                }
                else
                {
                    if (chr == '1')
                    Matrix[k, l] = (int)char.GetNumericValue('1');                             
                }
            }    
        }
    }           
}

```

How do I do it?