C#C
C#4y ago
Raki

❔ Optional parameter throwing error

I have a method

 
public UserAccount CreateOrUpdateUserAccountWithEmailSubscriptions
(string email, bool isNewsletterSubscribed, out bool isExists, bool signUp = false)
{

}


On calling this method like
                       _authenticationService.CreateOrUpdateUserAccountWithEmailSubscriptions(user.Email, viewModel.PatientInfoEmailEnabled, out var isExists);


It throws the error like screenshot error message. I don't want to send the optional parameter while passing since i believe it should take what i have specified in the method.
image.png
Was this page helpful?