I want to achieve following scenario:
Method:
public void Process(Request request, string statusCode=request.statusCode, string statusVal=request.statusVal)
{
...
}
Obviously above construct does not work in C#.
So in this case method process takes 3 parameters where calling parameter may or may not pass statusCode and/or statusVal in arguments.
When the values are not passed it should take the values from request object as default value. In short can the default value of optional parameters be dynamic or based on another compulsory parameter.