I have the following code :
class Calculator
{
public int Sum(int x, int y)
{
return x + y;
}
public int Sum(o
This is by specification. According to MSDN page out parameter modifier (C# Reference)
Although the ref and out keywords cause different run-time behavior, they are not considered part of the method signature at compile time. Therefore, methods cannot be overloaded if the only difference is that one method takes a ref argument and the other takes an out argument. The following code, for example, will not compile: