Valhalla Legends Archive

Programming => General Programming => .NET Platform => Topic started by: Imperceptus on July 05, 2007, 05:41 PM

Title: Inheritance
Post by: Imperceptus on July 05, 2007, 05:41 PM
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.

Quotecannot inherit from class because it expands the access of the base class outside the assembly
Title: Re: Inheritance
Post by: MyndFyre on July 06, 2007, 11:41 AM
What's the specific compiler error code?  MSDN usually has examples.

It looks like it's something like this:

Friend Class A

End Class

Public Class B Inherits A

End Class

In order for B to be public, A must also be public.  But as defined, A is internal to the assembly being created.
Title: Re: Inheritance
Post by: Imperceptus on July 06, 2007, 09:51 PM
im using your packetbuffer.cs in vb.  i was trying to do the following.

Public Class bnls : Inherits Packet

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.
Title: Re: Inheritance
Post by: Imperceptus on July 06, 2007, 10:10 PM
wwops yea i was thinking the wrong thing.  getting ahead of myself.  thanks anyways myndfyre