Optional Parameters:-
1 1) Optional Parameters should be
given at last of all parameters.
2 2) More than one optional
parameter is also allowed, but should be at last.
3 3)
The definition of the optional
parameter is as :
public async Task<IHttpActionResult> GetOptionalParams(string param1, string param2 = "",string param3="")
{
// some await
code
return Ok();
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.