can we create an empty interface with no definitions? If
so, how it should be called in the class?

Answers were Sorted based on User's Feedback



can we create an empty interface with no definitions? If so, how it should be called in the class?..

Answer / rajat

Yes, we can create an empty interface in C#. Since the
interface does not have any method, no need to implement
any method in the class.

Is This Answer Correct ?    8 Yes 0 No

can we create an empty interface with no definitions? If so, how it should be called in the class?..

Answer / bindu sharma

Yes we can create an empty interface.Empty interface is
called a marker interface.It is used by Comiler so we don't
need to call it explicitly.As there is no method in marker
interface,So we don't need to call it.

Is This Answer Correct ?    8 Yes 1 No

can we create an empty interface with no definitions? If so, how it should be called in the class?..

Answer / 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

More C Sharp Interview Questions

Explain the difference between object type and dynamic type variables in c#?

0 Answers  


What is activator c#?

0 Answers  


What is unmannaged code and will CLR handle this kind of code or not .

0 Answers   DELL,


what is IDisposal interface

0 Answers   Wipro,


What is the difference between array and list in c#?

0 Answers  






What is system console writeline in c#?

0 Answers  


Explain the types of assemblies in .net?

0 Answers  


What is the state of Garbage Collection after dispose() call info C# code?

4 Answers  


How do you inherit from a class in C#?

1 Answers  


What does addressof operator do in background ?

0 Answers  


How can we sort an array in c#?

0 Answers  


what is a delegate? what it is used for?

13 Answers   Choice Solutions, TCS,


Categories