hello,
i have written a code like this:
namespace
servercommunication{
public partial class Form1 : Form{
static int k = 0; static string[] data = new string[150];
public
void OnDataReceived(){
string
[] temp1 = new string[150];temp1[0]="1234";
if(k==0)
{
data[0]=temp1[0];
k++;
}
else
{
data[k]=temp1[0];
}
}
when the first function is called if(k==0) will execute,but when second time function is called data[0] has no data,i.e., it's showing "".what could be the problem
Scott LyslePosted May 8, 2008, 12:38 PM
using System;
temp1[i]);
It runs and seems to work. It produced this result:
Temp
0) 1234
Data
0) 1234
Temp
0) 1234
Data
0) 1234
1) 1234
Temp
0) 1234
Data
0) 1234
1) 1234
2) 1234
Temp
0) 1234
Data
0) 1234
1) 1234
2) 1234
3) 1234