C# Override with different parameters?

后端 未结 5 1526
天命终不由人
天命终不由人 2020-12-11 16:29

Here is an example of what I am looking to do.

public class A
{
    public virtual void DoSomething(string a)
    {
      // perform something
    }
}
public         


        
5条回答
  •  不知归路
    2020-12-11 16:41

    No, this won't work. When overriding the methods needs to have the same prototype.

提交回复
热议问题