int? <parametername> = null

public List<Photo> Get(int id, string type, int? objectid = null, int? categoryid = null)
{
...
}

Optional parameters needs to be nullable type and initialized to null.

Last modified: March 29, 2021

Author

Comments

Write a Reply or Comment