NullReferenceException with MyBase.New()

G

Guest

I have an object employee that is derived from person object. In .net 1.1 the
following procedure worked without any problem. In 2.0 i get the
nullreferenceexceptionerror. What could be going on here?

public class employee
inherits person

public sub new(info as string)
mybase.new(info) <<<<<<<<<<<<nullreferenceexception was unhandled by user
code (object reference not set to an instance of an object)
end sub

thx
dave
 
K

Karl Seguin

I don't believe there's anything wrong with your syntax.

Clearly there's simply a nullreference exception in your base constructor.

perhaps info is null? it's impossible to tell what else the problem could
be without knowing what the New(info as string) constructor of Person is.
 
G

Guest

Thank you Karl for your fast feedback.

Yes, you were right the base class (dll) had errors in it.

ty
 
B

bhawin13

Dave

Checkout base constructor and argument that you pass to clild
constructor (info).

B
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top