Markup Interface
What is the markup interface in C#? is Microsoft really implement inside FCL Or BCL? if yes then where?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jun 4, 2012, 2:57 AM EDT
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
VulpesRank #55 · 29.2K reputationPosted Jun 4, 2012, 2:34 AM EDT
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.
Amit PatelRank #622 · 3.8K reputationPosted Jun 4, 2012, 2:45 AM EDT
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