-
April 12th, 2010, 05:59 AM
#1
Question on Interface
Hi,
Can you please help interpret the following statement with respect to C# ?
[Code]
All objects must expose some dynamic interface discovery mechanism so consumer components can, if they desire, access their "extended" interfaces.
[\Code]
I am not very clear with regard to what the author is trying to say with regard to dynamic interface discovery mechanism here - can someone please explain ?
-
April 12th, 2010, 10:13 PM
#2
Re: Question on Interface
I believe it means that an object (A) must supply a mechanism that allows other objects (B,C,D... etc) to detemine what the object (A) provides.
In other words, other objects (B,C,D... etc) must be able to enumerate the methods/properties etc in the original object (A).
Rob
-
Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......
-
April 13th, 2010, 03:36 AM
#3
Re: Question on Interface
It seems like it talks about COM which has other approach to interfaces than C#.
- Make it run.
- Make it right.
- Make it fast.
Don't hesitate to rate my post.
-
April 13th, 2010, 05:06 AM
#4
Re: Question on Interface
All objects must expose some dynamic interface discovery mechanism so consumer components can, if they desire, access their "extended" interfaces.
If this really is .NET, then you get all this for free as part of the language.
You've got the 'is' keyword (or 'as' and test for null) which tests if an object implements a particular interface (amongst other things).
You can also use reflection to determine if a type implements a particular method.
Darwen.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|