Created
February 20, 2024 13:59
-
-
Save jonpryor/7f6db19d56d073ce6ee0994133bc85ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
interface IFruit { | |
string Name {get;} | |
} | |
class Banana : IFruit { | |
public string Name => "Banana"; | |
} | |
class Test { | |
public static void Main () | |
{ | |
var bananas = new Banana[]{ | |
new Banana(), | |
new Banana(), | |
}; | |
IList<Banana> b = bananas; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment