示例#1
0
    public static void Main()
    {
        var tractor = new Tractor();
        if (tractor is IGo) {
            tractor.PullPlough();
        }

        var horse = new Horse();
        if (horse is IGo) {
            horse.PullPlough();
        }
    }