Valhalla Legends Forums Archive | .NET Platform | Inheritance

AuthorMessageTime
Imperceptus
I've worked with some inheritance with projects like RunUO and have a basic understanding of what is going on. but I have no clue what this means.  I have Idea's, but If someone could break it down for me I would appreciate it.

[quote]cannot inherit from class because it expands the access of the base class outside the assembly[/quote]
July 5, 2007, 10:41 PM
Myndfyr
What's the specific compiler error code?  MSDN usually has examples.

It looks like it's something like this:
[code]
Friend Class A

End Class

Public Class B Inherits A

End Class
[/code]
In order for B to be public, A must also be public.  But as defined, A is internal to the assembly being created.
July 6, 2007, 4:41 PM
Imperceptus
im using your packetbuffer.cs in vb.  i was trying to do the following.

[code] Public Class bnls : Inherits Packet[/code]

the exact error is
Error 2 'bnls' cannot inherit from class 'Packet' because it expands the access of the base class outside the assembly.   Maybe I am thinking wrong about what I am trying to do. Im worried that what I am trying to do isn't possible and I have submitted my noobness to the public in a plea for help.
July 7, 2007, 2:51 AM
Imperceptus
wwops yea i was thinking the wrong thing.  getting ahead of myself.  thanks anyways myndfyre
July 7, 2007, 3:10 AM

Search