C# - Keyword usage virtual+override vs. new
问题 What are differences between declaring a method in a base type \" virtual \" and then overriding it in a child type using the \" override \" keyword as opposed to simply using the \" new \" keyword when declaring the matching method in the child type? 回答1: The "new" keyword doesn't override, it signifies a new method that has nothing to do with the base class method. public class Foo { public bool DoSomething() { return false; } } public class Bar : Foo { public new bool DoSomething() {