public class A
{
void methodA(int a){}
void methodA(ref int a){}
}
static void Main()
{
int a=1;
new classA().methodA(a);
}
In Main class, which method is called? Are methods in class A are overloaded? can overriding is possible on the bases of value or reference parameters? Please help out to make me clear.
After fixing your code:
You’ll see that the first call will print ‘Without ref’ and the second ‘With ref’. You could’ve done this yourself.
The manual says it’s perfectly possible: