Q:

Invalid Arguments "out" parameters

I have a method and I want use out parameter. But I am missing somethings I couldnt find. I have 3 parameters firstly long id, I am sending that ID and I am processing it and I am creating my workerName (second parameter) and workerTitle (third parameter).
My method is;
public static void GetWorkerInfo( long workerID, out string workerName, out string workerTitle)
{
   // Some code here
}

Where I am calling my method;
GetWorkerInfo(workerID, out workerName, out workerTitle)

A:

With C# 7 you will be able to declare your output parameters as part of method call, like this:
GetWorkerInfo(workerID, out var workerName, out var workerTitle);

Prior to switching to C# 7, however, you must declare variables that you pass as out parameters outside of the call:
string workerName;
string workerTitle;
GetWorkerInfo(workerID, out workerName, out workerTitle);

