0 like 0 dislike
483 views
Why we craete Empty Interface? what is use of same..?
in Education & Reference by | 483 views

1 Answer

0 like 0 dislike
Interfaces define members that provide a behavior or usage contract. The functionality that is described by the interface can be adopted by any type, regardless of where the type appears in the inheritance hierarchy. A type implements an interface by providing implementations for the members of the interface. An empty interface does not define any members. Therefore, it does not define a contract that can be implemented.

If your design includes empty interfaces that types are expected to implement, you are probably using an interface as a marker or a way to identify a group of types. If this identification will occur at run time, the correct way to accomplish this is to use a custom attribute. Use the presence or absence of the attribute, or the properties of the attribute, to identify the target types. If the identification must occur at compile time, then it is acceptable to use an empty interface.
by

Related questions

0 like 0 dislike
0 answers
asked Sep 15, 2013 in Education & Reference by sneha | 477 views
0 like 0 dislike
1 answer
0 like 0 dislike
0 answers
1 like 0 dislike
1 answer
0 like 0 dislike
2 answers
asked May 29, 2014 in Education & Reference by digital (40 points) | 64 views
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Feb 27, 2014 in Education & Reference by india2014 (140 points) | 32 views
0 like 0 dislike
1 answer
asked Feb 27, 2014 in Education & Reference by india2014 (140 points) | 30 views
0 like 0 dislike
0 answers
1 like 0 dislike
2 answers
asked Feb 13, 2014 in Education & Reference by Sb Ekt (80 points) | 95 views

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

1,219 questions
1,365 answers
558 comments
2,099 users