function - Default Parameters for method in c# -
i have following method signature want give default value 1 of parameters dont want give default value other parameter leadsourcestatus
protected promotioncatalogresponserootobject getvideopromotioncatalog(promotioncatalogtypes catalogtype = promotioncatalogtypes.residential, leadsourcestatus leadsourcestatus)
but when try this, error
optional parameters must appear after required parameters
what best way deal this?
the best way deal told do, , put optional param @ end:
protected promotioncatalogresponserootobject getvideopromotioncatalog(leadsourcestatus leadsourcestatus, promotioncatalogtypes catalogtype = promotioncatalogtypes.residential)
Comments
Post a Comment