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 is routing in c#?
what optimizations does the c# compiler perform when you use the /optimize+ compiler option?
What are generic types?
Explain About stateless and state full web service
What is the default value of boolean variable?
Explain attributes in c#?
How do I unload an application domain?
What is datasource c#?
What are the steps for creating clr trigger
What is yield return in c#?
What is the real use of interface in c#?
What is a cs file?
Why do we need events in c#?
What is difference between iqueryable and ienumerable in c#?
What is the difference between constant and readonly in c#?