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
What are custom exceptions?
What is a generic c#?
What is xml serialization in c#?
What is wcf c#?
Is c# pass by value?
What is strongly typed view?
Can we inherit class that contains only one private constructor?
Differentiate between copy and default constructor.
How to assign Null value to Var?
What does out mean c#?
What is data type in c# with example?
What is c# in asp net?
How do you pass reference parameters in c#?
What is the object class in c#?
Differentiate between response.expires and response.expiresabsolute?