Hey i can't seem to find the answer to this question answered in a way that makes complete sense to me.
when declaring nullable arguments in c#, what is the difference between declaring a argument with a question mark like this:
public method(int? variable):
and with an assignment like this:
public method(int variable = null):
intnullable.variableoptional with a default value ofnull, then you'd saypublic method(int? variable = null):struct) are not normally nullable. To addnullto the range of a value type variable, declare it as nullable (eitherint?orNullable<int>). If you add a default expression to a parameter declaration for a method (like(int? variable = null)), then you are declaring the parameter to be optional. If the caller doesn't specify a value for that parameter at the call site, the parameter is considered to have its default value in the body of the method