Hi Friends,
I am getting the following error with my code
"Object reference not set to instance of the object" .
My code goes as follows:
...
...
string[] isem= new string[125];
decimal[] perc = new decimal[125];
student s1=new student();
...
...
public void func()
{
isem = new string[125];
perc = new decimal[125];
string[] temproll=new string[125];
int j=0;
sem = s1.calcallperc1(..., ..., ....);//calcperc1 returns an array
j=-1;
foreach (string s in isem)
{
temproll[++j] = s.Split(' ')[0];
perc[j] = Convert.ToDecimal(s.Split(' ')[1]);
}
}
...
Please help!!