473,406 Members | 2,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

NullReferenceException with MyBase.New()

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
Dec 21 '05 #1
3 1390
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.

--
MY ASP.Net tutorials
http://www.openmymind.net/
"dave" <da**@discussions.microsoft.com> wrote in message
news:4D**********************************@microsof t.com...
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

Dec 21 '05 #2
Thank you Karl for your fast feedback.

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

ty
Dec 22 '05 #3
Dave

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

B

Dec 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Eric Diana | last post by:
I am trying to place an strings into an array of strings I am declaring as Dim Fields() As String I have another variable im doing the same thing with and it works. Public Shared Operations()...
1
by: gregory_may | last post by:
This code seems to "work" but I get the following errors: An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll then this one: An unhandled...
0
by: monkey king | last post by:
I have a given dll file(PDFCreator.dll) - probably generated by VC++. I want to use its method(PDFCreator()) in dotNet environment. It works well in WindiowsApplication, but bad in WebApplication...
2
by: Shannon | last post by:
I am having a very strange issue with my asp.net application. I have created a datagrid which dynamically gets populated from a person choosing a value from a dropdown list and entering a quantity...
0
by: muralidharan | last post by:
WebForm1.aspx Code: <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView id="TreeView1" Height="520"...
3
by: Patrick.O.Ige | last post by:
I'm loading an Array below but getting the error "Object reference not set to an instance saying 'ItemNumber = CType(Args.Item.FindControl("ItemNumber"), TextBox).Text' is the error line. I DON'T...
6
by: William Mild | last post by:
I must be getting brain fried. I can't see the error. Create a new web form with the following code begind: Public Class test Inherits System.Web.UI.Page Public Class ReportCardData ...
10
by: Ivan Weiss | last post by:
Hey all, I am using the following code to attempt to draw an image on the MdiClient Area thanks to some help from another post. However, the line If m_MDIClient.Width > 0 And m_MDIClient.Height >...
5
by: Martin H. | last post by:
Hi, I've got this problem: I currently work on a control which inherits from ListBox. In my control I shadowed the Items with a custom ObjectCollection, which has some additional properties....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.