can we create an empty interface with no definitions? If
so, how it should be called in the class?

Answer Posted / mohit bhandari

Yes we can create an empty interface.Empty interface is
called a marker interface.These interfaces are generally
used as way of identifying a group of types. If this
identification will occur at runtime, the correct way to
accomplish this is to use a custom attribute. Use the
presence or absence of the attribute, or the attribute's
properties, to identify the target types.As there is no
method in marker interface,So we don't need to call it.

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you change the value of a constant filed after its declaration?

714


So what makes your code really object-oriented #?

693


What is string method in c#?

684


Explain About Global.asax

739


Enlist the different types of classes in c#?

716


Are c# generics the same as c++ templates?

675


Which config file has all the supported channels/protocol?

754


How can you prevent escaping on backslashes in C# with string definitions?

940


What is icomparable in c#?

729


What are the Types of instancing properties and explain each. Explain the difference between multiuse,singleuse and globalmultiuse and which is default

764


What is console readkey in vb net?

863


How does bitwise work?

696


What is managed code?

730


What is the use of tuple in c#?

701


Why is ienumerable used?

675