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
Can you change the value of a constant filed after its declaration?
So what makes your code really object-oriented #?
What is string method in c#?
Explain About Global.asax
Enlist the different types of classes in c#?
Are c# generics the same as c++ templates?
Which config file has all the supported channels/protocol?
How can you prevent escaping on backslashes in C# with string definitions?
What is icomparable in c#?
What are the Types of instancing properties and explain each. Explain the difference between multiuse,singleuse and globalmultiuse and which is default
What is console readkey in vb net?
How does bitwise work?
What is managed code?
What is the use of tuple in c#?
Why is ienumerable used?