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
Why do we use interface in c#?
How to force my .net app to run as administrator on windows 7?
Explain the difference between class and interface in .net?
What is default access specifier for class in c#?
What is the difference between delegates and superdelegates?
Are cao stateful in nature?
How can we set the class to be inherited, but prevent the method from being over-ridden?
what is a static constructor?
What does dbml mean?
What is the difference between abstract class and interface in c#?
What is difference between method and function in c#?
What is the implicit name of the parameter that gets passed into the class set method?
Is lazy thread safe c#?
What is reflection c#?
What is the use of convert toint32 in c#?