Ask a Question

Ask a Question
Back to All

Can you set a parameter as optional in C#?

I have a question.
Is there any parameter attribute to set the parameter as optional in C# ?
[ClientCallable]
public async Task<S2C_SESSION_URL_WITH_TOKEN> GetSession(string passCode = "")
{
...
}

I'm going to make the parameter "passCode" as optional.