Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Microsoft DotNet
Microsoft VB .NET
Scoping within an interface?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Sohum, post: 7187330"] First of all, it is the same Sohum (I don't know why OE uses my spymac address) Mattias Sjögren wrote: This doesn't work, because I need to accept an Interface which encompasses both in a method. I can't exactly write this: Public Sub AcceptsInterface(A as MyInterface+MyInternalInterface) now can I? Branco Medeiros wrote: <snip> So what happens here when I define a method in another class in this assembly that needs to accept the interface, and needs to use Property X? If Public Sub AcceptsInterface(A as A) .... = DirectCast(A,B) then they can inherit A and create other interfaces and pass them to this function, and the Directcast crashes. I could add error handling, but I would prefer to not let them inherit in the first place (less ugly). But I can't mark it NotInheritable because I've already inherit from it! And I can't write Public Sub AcceptsInterface(B as B) because B is friend. Is there any way to de-uglify the solution? Sohum [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Microsoft DotNet
Microsoft VB .NET
Scoping within an interface?
Top