日期:2014-05-17  浏览次数:20854 次

【stackoverflow上没有得到关注和解答,回CSDN试试,懒得翻译回中文,凑合看看吧!你们也该练习下英语了!】
How to realize INamingContainer,tell me something deeper

If I want to implement a custom container control ,I must keep my control inheriting from INamingContainer,It's a interface was defined as a marker interface.As I know,that will make CLR creating control statement into metadata like attribute.

So,I want to know :

Is the .net framework system have only created the metadata for itself's marker interface? Can I Create a marker interface?

What will happen when the CLR compiler is compiling the control inherits from INamingContainer?

What is the function of INamingContainer for container control?

thanks in advance!
stackoverflow interface

------解决方案--------------------
1.Marker interface just like attributes in c#.
2.I can construct a attribute object by using a arrtribute type instead of marker interface.
3,And I can code generic set with marker interface but not arrtribute.
4,In addition to above statements,I want to tell you there is nothing about the difference between attribute and  marker interface.
5,So,you can't create your marker interface just like you can't create the attribute which has the similar function to the system attribute types.