Inhritance & Refrerences


E

elziko

I have found that if Class C inherits from Class B and Class B inherits
from Class A then in a project that uses Class C I must reference the
assembly that contains Class A as well as the assembly that contains
Class B since the latter assembly will not contain all the meta data
from the former assembly.

However, is there any way that forces a project to include a reference
to assemblies contain both Class A and B when Class C (a control) is
dropped onto a form. Otherwise an error message such as:

'Public Overridable NotOverridable Property Author() As String' is
declared in project 'Company.Scope.ModuleBase.dll', which is not
referenced by project 'WindowsApplication1.exe'.

....is generated which does not make the problem immediately obvious to
the developer.

TIA
 
Ad

Advertisements

R

Richard Myers

elziko said:
I have found that if Class C inherits from Class B and Class B inherits
from Class A then in a project that uses Class C I must reference the
assembly that contains Class A as well as the assembly that contains
Class B since the latter assembly will not contain all the meta data
from the former assembly.

However, is there any way that forces a project to include a reference
to assemblies contain both Class A and B when Class C (a control) is
dropped onto a form. Otherwise an error message such as:

'Public Overridable NotOverridable Property Author() As String' is
declared in project 'Company.Scope.ModuleBase.dll', which is not
referenced by project 'WindowsApplication1.exe'.

...is generated which does not make the problem immediately obvious to
the developer.

TIA

Not to be a clever but i think

'Public Overridable NotOverridable Property Author() As String' is
declared in project 'Company.Scope.ModuleBase.dll', which is not
referenced by project 'WindowsApplication1.exe'.

Makes it more than obvious. Thats an example of a pretty good and reasonably indicative error
message.... for Microsoft.

Richard
 
Ad

Advertisements

E

elziko

Makes it more than obvious. Thats an example of a pretty good and reasonably indicative error
message.... for Microsoft.

OK, so its not that bad but I was hoping for a way to force a reference.
 

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

Top