I am designing a calculator in C#, I need to write a code for a backspace operation. for that i need to convert the text(string) value in the calculator to a single one dimensional char array, I tried using the following
string num1 = "Hello World";
char[] numarr = num1.ToCharArray();
this works only on console and does not work in forms.
then I tried using arraylists,
string txt1 = "Hello World";
ArrayList x1 = new ArrayList();//initializes the new arraylist
x1.Add(txt1);//assigns the variable to the arraylist
string txt2 = System.String.Concat(x1.ToArray());
this code crashes the app during runtime,
Can anybody help me? PLEASE
thanks in advance......
string num1 = "Hello World";
char[] numarr = num1.ToCharArray();
this works only on console and does not work in forms.
then I tried using arraylists,
string txt1 = "Hello World";
ArrayList x1 = new ArrayList();//initializes the new arraylist
x1.Add(txt1);//assigns the variable to the arraylist
string txt2 = System.String.Concat(x1.ToArray());
this code crashes the app during runtime,
Can anybody help me? PLEASE
thanks in advance......