I am not sure, if this is right place to ask this question. Moderator can move this question to appropriate place if required.
I have question in C#.NET
I have below class with overloaded methods,
public class A
{
public void GetNumber(short n)
{
}
public void GetNumber(int n)
{
}
public void GetNumber(long n)
{
}
}
A a = new A();
a.GetNumber(100);
so it will call method with int parameter, My Question is Why it will call method with int Parameter.
also on similar lines,
var n = 100;
in this case data type of n will also be set to int.
Why not short or other numeric data type.
Is there any logic/reason behind this or its just Microsoft has set this default standard for number data type.