Claim your Biolink Click Here
0 like 0 dislike
593 views
Why we craete Empty Interface? what is use of same..?
in Education & Reference by | 593 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 | 582 views
0 like 0 dislike
1 answer
0 like 0 dislike
0 answers
1 like 0 dislike
1 answer
asked Jun 3, 2014 in Education & Reference by Bhoomika (-30 points) | 154 views
0 like 0 dislike
2 answers
asked May 29, 2014 in Education & Reference by digital (-40 points) | 397 views
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Feb 27, 2014 in Education & Reference by india2014 (60 points) | 189 views
0 like 0 dislike
1 answer
asked Feb 27, 2014 in Education & Reference by india2014 (60 points) | 188 views
0 like 0 dislike
0 answers
1 like 0 dislike
2 answers
asked Feb 13, 2014 in Education & Reference by Sb Ekt (0 points) | 311 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,310 questions
1,471 answers
569 comments
4,809 users