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

What does out mean in c#?

0 Answers  


Can we call server-side code (c# or vb.net code) from javascript?

0 Answers  


In gridview in editmode if we want to display information in one combobox based on

0 Answers   FD, Microsoft,


How long does it take to learn c# programming?

0 Answers  


Is namespace necessary in c#?

0 Answers  


What is the use of nullable types in c#?

0 Answers  


How to prevent the error while updating ui control from another thread?

0 Answers  


Why do we need interface in c#?

0 Answers  


What?s the difference between <c> and <code> XML documentation tag?

1 Answers  


What is a property c#?

0 Answers  


What is difference between ienumerable and list?

0 Answers  


How do I download a program to my desktop?

0 Answers  


Categories