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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jun 13, 2012, 9:04 AM EDT
Covariance is narrower (string) to wider (object).
Contravariance is wider (object) to narrower (string).
Guest UserRank #4,868 · 321 reputationPosted Jun 13, 2012, 9:35 AM EDT
Interesting however as this is what is stated on Wiki
VulpesRank #55 · 29.2K reputationPosted Jun 13, 2012, 9:56 AM EDT
http://msdn.microsoft.com/en-us/library/ee207183.aspx