Yes, using generics:
public T Addtoatal<T>(T a, T b) {}
If the method needs to use any operators (+,-,*) etc. it will be problematic because generic types can't ensure that the class T has the operator (operators can't be declared in interfaces, and therefor you can't make a constraint to match).
In .Net 4.0 you could use dynamic typing to get a dynamic variable to contain the result and add to it:
public T Addtoatal<T>(T a, T b) {
dynamic res = a;
a += b;
return res;
}
In other .Net versions you'll need a work around like the Operator class in MiscUtils: generic method to add int, float, in c#
The second example with the three parameters would need to have a different signature (in .Net 2.0) because it has more parameters.
in .Net 4.0 you could just use optional parameters for generic types, but can't do it for value types:
public T Addtoatal<T>(T a, T b, T c = null) where T: class { //Do stuff }
But you could use boxing with nullable types, this would work with int and double:
public T Addtoatal<T>(T? a, T? b, T? c = null) where T : struct { //Do stuff, use .Value }
Now the next best thing you could do, if you don't want to use generics, is have a single method declaration as double (C# 4.0, because of the optional parameter):
public double Addtoatal(double a, double b, double c = 0) {}
In this example the int values will be converted to a double anyway, so there's no loss of data, and the int can implicitly converted to double, but the return value would need to be explicitly cast to int.