Click here to Skip to main content
15,884,177 members
Home / Discussions / C#
   

C#

 
GeneralRe: Initiating a generic type from a typeof expression Pin
Lutosław6-Jul-08 8:04
Lutosław6-Jul-08 8:04 
GeneralRe: Initiating a generic type from a typeof expression Pin
leppie6-Jul-08 8:25
leppie6-Jul-08 8:25 
QuestionRSA key exchange Pin
nyjcr5-Jul-08 7:04
nyjcr5-Jul-08 7:04 
QuestionOverriding custom contol OnPaint Pin
hpjchobbes5-Jul-08 6:54
hpjchobbes5-Jul-08 6:54 
AnswerRe: Overriding custom contol OnPaint Pin
Lutosław5-Jul-08 10:14
Lutosław5-Jul-08 10:14 
QuestionMDI Parent and Child Pin
benjamin yap5-Jul-08 5:27
benjamin yap5-Jul-08 5:27 
AnswerRe: MDI Parent and Child Pin
hpjchobbes5-Jul-08 8:04
hpjchobbes5-Jul-08 8:04 
GeneralRe: MDI Parent and Child [modified] Pin
benjamin yap6-Jul-08 0:08
benjamin yap6-Jul-08 0:08 
Inside my FrmMain (parent)

I have this

public Hashtable staffTable;

public FrmMain()
{
    InitializeComponent();
    staffTable = new Hashtable();
}


And inside my FrmLogin (child)

private FrmMain ParentForm;
private Staff staff;

public FrmLogin()
{
    InitializeComponent();

    staff = new Staff("Admin", "S123456A", "pass123", "13 April 1988", "ADDRESS", 912346678, 12345678, true, true, false, true);
    ((FrmMain)ParentForm).staffTable.Add("S8812466I", staff);
}


When the application is run, i get this error

"NullReferenceException was unhandled"
Object reference not set to an instance of an object.

modified on Sunday, July 6, 2008 6:26 AM

GeneralRe: MDI Parent and Child Pin
DaveyM696-Jul-08 1:33
professionalDaveyM696-Jul-08 1:33 
GeneralRe: MDI Parent and Child [modified] Pin
benjamin yap6-Jul-08 1:38
benjamin yap6-Jul-08 1:38 
GeneralRe: MDI Parent and Child Pin
DaveyM696-Jul-08 1:59
professionalDaveyM696-Jul-08 1:59 
GeneralRe: MDI Parent and Child Pin
benjamin yap6-Jul-08 2:07
benjamin yap6-Jul-08 2:07 
GeneralRe: MDI Parent and Child Pin
DaveyM696-Jul-08 2:18
professionalDaveyM696-Jul-08 2:18 
GeneralRe: MDI Parent and Child [modified] Pin
DaveyM696-Jul-08 4:16
professionalDaveyM696-Jul-08 4:16 
GeneralRe: MDI Parent and Child [modified] Pin
benjamin yap6-Jul-08 4:48
benjamin yap6-Jul-08 4:48 
GeneralRe: MDI Parent and Child Pin
DaveyM696-Jul-08 5:45
professionalDaveyM696-Jul-08 5:45 
GeneralRe: MDI Parent and Child [modified] Pin
benjamin yap6-Jul-08 6:00
benjamin yap6-Jul-08 6:00 
GeneralRe: MDI Parent and Child Pin
DaveyM696-Jul-08 8:12
professionalDaveyM696-Jul-08 8:12 
GeneralRe: MDI Parent and Child Pin
DaveyM696-Jul-08 9:22
professionalDaveyM696-Jul-08 9:22 
GeneralRe: MDI Parent and Child Pin
benjamin yap6-Jul-08 15:30
benjamin yap6-Jul-08 15:30 
GeneralRe: MDI Parent and Child Pin
DaveyM697-Jul-08 11:29
professionalDaveyM697-Jul-08 11:29 
GeneralRe: MDI Parent and Child Pin
benjamin yap7-Jul-08 22:35
benjamin yap7-Jul-08 22:35 
QuestionBound combobox problem Pin
Alessandra775-Jul-08 4:38
Alessandra775-Jul-08 4:38 
QuestionHow to get a RGB values from an image buffer? Pin
CopperCircle5-Jul-08 2:58
CopperCircle5-Jul-08 2:58 
AnswerRe: How to get a RGB values from an image buffer? Pin
User 66585-Jul-08 3:07
User 66585-Jul-08 3:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.