方法重载的理解

代码一是正确的:
代码一:

public void test(int x,int y){}

public void test(int x,ref int y){}

public void test(int x,int y,string a){}

但代码二则有问题,compiler说已有test成员存在了
代码二:
public void test(int x,int y){}

public int test(int x,int y){return 0;}

可知:重载还是依据参数类型和个数来的,非返回类型矣.
原文地址:https://www.cnblogs.com/FallingAutumn/p/432269.html