2
Answers

Get value from appsettings.json

Photo of Rohan

Rohan

3y
791
1

Hello, everyone, I have to use this code to get value from the appsetting.json file and this is my code but I have faced an error. Please check this.

 const string endpointSecret = _config["St:Secret"];

The expression being assigned to 'endpointSecret' must be constant - Error 

Answers (2)