Markup Interface
What is the markup interface in C#? is Microsoft really implement inside FCL Or BCL? if yes then where?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jun 4, 2012, 6:57 AM
I've found another one here:
http://msdn.microsoft.com/en-us/library/system.web.ui.inamingcontainer.aspx
Curiously, the use of marker interfaces is contrary to Microsoft's own guidelines for interface design!
http://msdn.microsoft.com/en-us/library/ms229022.aspx
Amit PatelPosted Jun 4, 2012, 6:45 AM
You are correct. Markup interface dose not contains any members. Microsoft is also using this concept inside the FCL Or BCL.
See that link.
http://msdn.microsoft.com/en-us/library/system.web.sessionstate.irequiressessionstate.aspx
VulpesPosted Jun 4, 2012, 6:34 AM
These can be useful when used in conjunction with extension methods.
A class which implements the marker interface doesn't have to implement any methods but, in effect, methods can be added to the class as extension methods. These methods will extend any class which is 'marked' as implementing the interface.