Converting c# code to Windows phone code
I want to ask you how can I convert some piece of c# code to work on a Windows Phone Application.

I have an array: double[0,0] table = new double[2,2];

And I fill him:  
table[0, 0] = Double.Parse(Console.ReadLine());

table[0, 1] = Double.Parse(Console.ReadLine());
etc

And I want, whenever I press the Textbox on my Windows Phone and when the keyboard pops up, to be able to fill this array.

The things I did: I put this c# code I gave u above, inside the Textbox but I get a ArgumentNullException. 

Fact is, this is my first attempt to make an application on Windows Phone,I know a lot of C# but I don't know where should I put the codes I write on Windows Phone buttons,Textboxs, etc. 

So if this is too much trouble to answer maybe you could prompt me to a good tutorial on converting c# code and making it work on Windows Phone. 

Thanks a lot in advance.
Converting c# code to Windows phone code
===

I want to ask you how can I convert some piece of c# code to work on a Windows Phone Application.

I have an array: double[0,0] table = new double[2,2];

And I fill him:  
table[0, 0] = Double.Parse(Console.ReadLine());

table[0, 1] = Double.Parse(Console.ReadLine());
etc

And I want, whenever I press the Textbox on my Windows Phone and when the keyboard pops up, to be able to fill this array.

The things I did: I put this c# code I gave u above, inside the Textbox but I get a ArgumentNullException. 

Fact is, this is my first attempt to make an application on Windows Phone,I know a lot of C# but I don't know where should I put the codes I write on Windows Phone buttons,Textboxs, etc. 

So if this is too much trouble to answer maybe you could prompt me to a good tutorial on converting c# code and making it work on Windows Phone. 

Thanks a lot in advance.