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
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 |
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 |
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 |
In c#.Net Application For DataGridview binding which method is faster in below two case?Why..? 1)looping-Using For loop 2)Databinding direct using Dataset
What is the use of the static constructor? When static constructor gets compiled?
What is constructors, explain with syntax
Example of value type and refarnce type
How do you implement thread synchronization (object.wait, notify,and criticalsection) in c#?
What is a hash table c#?
Is a char?
Is c# strongly typed?
What is the difference between var and dynamic types in c# 4.0?
Consider the following pieces of C# code: a. interface I1 {/*......*/} interface I2 {/*......*/} struct Point : I1,I2 {/* ..... */} b. struct Book{ int bookId; struct Book b; } c. using M=Mystruct; struct MyStruct{ int id; } class MyClass{ static void Main(string[] args){ M m = new M(); } } d. struct Sample{ Sample ref x; } Which of the above are correct? Choose one of the options below. a, c and d are right a only right a and c are right d only wrong None of the listed options
Can you inherit multiple interfaces?
Can an interface inherit class/abstract class.
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)