Why can I not call another class's method with out parameter? For example:
class Program
{
static void Main(string[] args)
{
int i =10;
int j = OtherClass.Test(i);
}
}
class OtherClass
{
public static int Test(out int i)
{
i = 30;
return i+15;
}
}
I get "The best overloaded method match for 'ConsoleApplication2.OtherClass.Test(out int)' has some invalid arguments" error??
How can I do this? I need to call some general static methods with some out parameters.
Thanks