Inheritence and Reference required to assembly


C

chawra

under one solution I have 3 projects 2 class library and one client
(Web)

Project 1
-------------

Public Class One

Public Function GetFirstName() as string
return "FirstName"
End Function

End Class

and Child Class

Project 2
--------------
Public Class Two

Inherits One

Public Function GetLastName() as string
return "Lastname"
End Function

End Class



Project 3 (Client)
--------------

When I write ->

Private User As New Two

VS2003 gives me an error
"reference required to assembly 'XXX' containing the base class 'XXX'.
Add one to project."

=> Why would cliend need to know/referece the base class...

Thanx
 
Ad

Advertisements

H

Herfried K. Wagner [MVP]

under one solution I have 3 projects 2 class library and one client
(Web)

Project 1
-------------

Public Class One

Public Function GetFirstName() as string
return "FirstName"
End Function

End Class

and Child Class

Project 2
--------------
Public Class Two

Inherits One

Public Function GetLastName() as string
return "Lastname"
End Function

End Class



Project 3 (Client)
--------------

When I write ->

Private User As New Two

VS2003 gives me an error
"reference required to assembly 'XXX' containing the base class 'XXX'.
Add one to project."

=> Why would cliend need to know/referece the base class...


.... because the type 'Two' is based on the type 'One'!
 
Ad

Advertisements

C

chawra

Class 'Two' has a referece of class 'One', then why would client need
to reference class 'One' also??? why would client need to know which
other assembly they need to reference in order to use 'Two'..

thanx
 

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