N

N

  • NA
  • 15
  • 0

Moving an array element to a varaible

May 12 2009 12:23 PM

Moving an array element to a varaible.

When I started I didn't think just taking an element and copying to a varaible was such a hassle.

Ok, I have a string array defined as:

public static string[] Trux_Info = new string[20];

and I have a varaible define as

public static string port_in = "";

Now I thought that something like

port_in = Trux_Info[3]

would work. It didn't. I tried Trux_Info.GetValue(3). It didn't work right. I know Trux_Info has info I can print to screen\file and the right info is there. I even passed the array across child, parent and back to a different child, the info is there.

I really need this element to go to this single variable, because after this happens then the processing can begin.

Any and all suggestion are appreciated.

Thanks N.


Answers (1)