H
Harold Hsu
Hi all,
What's the default access type of a property declared in an interface? The
one I'm looking at is IBindingList:
Public Interface IBindingList
....
ReadOnly Property AllowEdit As Boolean
....
End Public
I have a class that implements IBindingList, but AllowEdit is implemented as
Protected:
Protected ReadOnly Property AllowEdit() As Boolean Implements
System.ComponentModel.IBindingList
....
End Property
If there is a method that takes an object implementing IBindingList as an
argument, wouldn't accessing AllowEdit causes an error? Why doesn't the VB
compiler complains when AllowEdit is implemented as Protected (or even
Private)? The C# compiler does complain. What am I missing here?
Thanks in advance,
Harold
What's the default access type of a property declared in an interface? The
one I'm looking at is IBindingList:
Public Interface IBindingList
....
ReadOnly Property AllowEdit As Boolean
....
End Public
I have a class that implements IBindingList, but AllowEdit is implemented as
Protected:
Protected ReadOnly Property AllowEdit() As Boolean Implements
System.ComponentModel.IBindingList
....
End Property
If there is a method that takes an object implementing IBindingList as an
argument, wouldn't accessing AllowEdit causes an error? Why doesn't the VB
compiler complains when AllowEdit is implemented as Protected (or even
Private)? The C# compiler does complain. What am I missing here?
Thanks in advance,
Harold