Given the following 2 code examples:-
// Covariant interface.
interface ICovariant
// Implementing covariant interface.
class Sample
class Program
{
static void Test()
{
ICovariant
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jun 13, 2012, 1:04 PM
Covariance is narrower (string) to wider (object).
Contravariance is wider (object) to narrower (string).
VulpesPosted Jun 13, 2012, 1:56 PM
http://msdn.microsoft.com/en-us/library/ee207183.aspx
Guest UserPosted Jun 13, 2012, 1:35 PM
Interesting however as this is what is stated on Wiki