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
Where do we use serialization in c#?
Is php easier than c#?
Is it not possible to store a boolean value as a variable?
What is interface inheritance?
How does bitwise xor work?
What is Event - Delegate?
Describe the process of “exception handling implementation” in c#?
Why we use delegates in c#?
Explain polymorphism in c# with a simple example?
Can a struct inherit from another struct or class in c#?
What is the main method in c#?
What is a shared assembly?
What is difference between destructor and finalize?
Can we change static value in c#?
What is serialization and deserialization in c# with example?