Not via a return statement - a method can only ever return a single object.
There are two ways to do what you want:
1) Return an object which contains the two (or more) values you need:
private KeyValuePair<string, int> MyMethod()
{
...
return new KeyValuePair<string, int>("hello", 666);
}
2) Add an
out
or
ref
parameter:
private string MyMethod(out int iValue)
{
...
iValue = 666;
return "hello";
}
[edit]
int
parts of KeyValuePair declarations vanished... - OriginalGriff[/edit]