The following code throws this error:
An unhandled exception of type 'System.NullReferenceException' occurred in Classes.exe
Additional information: Object reference not set to an instance of an object.
When I call the form load function it throws the above error and Im not sure why.
namespace Classes
{
///
{
public ActSessions(){
// // TODO: Add constructor logic here //}
public class User{
public string name; public string tabindex;}
public User [] UserArray = new User[100];}
}
private void Form1_Load(object sender, System.EventArgs e)
{
ActSessions Active =
new ActSessions();Active.UserArray[0].name = "JOHN"; //this line throw the error
}
Brandon TurnerPosted Mar 29, 2006, 1:18 PM
Jonathen ScaletPosted Mar 29, 2006, 10:02 AM
Thanks,
Jon
Brandon TurnerPosted Mar 29, 2006, 9:50 AM