Thread: VB.Net Error
View Single Post
Old 06-22-2005, 01:20 PM   #2 (permalink)
Iron_Cross
 
Ultra Techie

Join Date: Sep 2003

Location: Bamberg, Germany

Posts: 549

Iron_Cross

Send a message via ICQ to Iron_Cross Send a message via MSN to Iron_Cross Send a message via Yahoo to Iron_Cross
Default

Code:
Dim x As emp
should be
Code:
Dim x As emp = New emp()
x is still null, you have to call the constructor to actual create the object before using it.

For future reference you could also do it like this:
Code:
Dim x As New emp()
`OR you could also do it like this:
Dim x As emp
x = New emp()

__________________

See today\'s Penny-Arcade!(May contain foul lanuage)
Pain is weakness leaving the body.

PM Me for my MSN
Iron_Cross is offline