dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] Cannot access protected member


From: Jérémie Banier
Subject: [Pnet-developers] Cannot access protected member
Date: 21 Jan 2004 21:53:54 +0100

Hello,

This is my first post to this mailling list, so please be gentle if
this is|isnot a bug that was|wasnot reported 1 minute ago.
 
I wrote a little prog in C# that I can compile using pnetlib (0.62) but
not using vsnet (2003 + sp1).

I've got a base class 'asn1DataTypes', asn1VarBindList.derive from 
asn1DataTypes and contains other asn1DataTypes ...

but when I try to compile vsnet report the following error:
-----
asn1.cs(351): Cannot access protected member
'Ber.asn1DataTypes.m_Oid' via a qualifier of type 'asn1DataTypes'; the
qualifier must be of type 'asn1VarBindList' (or derived from
it)
-----

And the more I think about it the more I think that vs is right,
because the protected keyword means that your child can use it but 
not foreign stranger, and my container reference the object as beeing
asn1DataTypes ...

Of course my container inherits from asn1DataTypes but the instance of
the object used is not ... and to me that is were the confusion is, the
cscc must say something like does 'this' object inherits from
asn1DataTypes.

I've attached the 'problematic' source code for clarity and hope it will
help.

Best regards,
Jérémie.


Attachment: asn1.cs
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]