Return type is not part of the method signature in C#. Only the method name and its parameters types (but not the parameter names) are part of the signature. You cannot, for example, have these two methods:
int DoSomething(int a, int b);
string DoSomething(int a, int b);
To be clear: Methods cannot be overloaded based on their return type. They must have a unique name, unique parameter types, or pass their arguments differently (e.g. using out
or ref
).
Edit: To answer your original question, the method signature for your method is:
DoSomething(int, int)
Note that this all applies to normal methods. If you're talking about delegate
s, then you should see keyboardP's answer. (Short version: return type IS part of the signature for a delegate).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…