标签:支持 other strong another ati not sha 方法 nta
C#支持方法的重载:方法名相同,但是方法的参数或参数类型不同。
class ResultDisplayer
{
public void DisplayResult(string result)
{
// implementation
}
public void DisplayResult(int result)
{
// implementation
}
public void DisplayResult(int result, int anotherResult)
{
// implementation
}
}
注:方法名相同,然后下面两条满足其中一条即可
标签:支持 other strong another ati not sha 方法 nta
原文地址:https://www.cnblogs.com/codesee/p/13138099.html