Call public method
Hello, Im trying to create a "config" which retrieves values from the appsettings.json file.
Ive created an example below:
How would you retrieve "UserName" from a different class?
Something like?
Or what would you say is best practice?
Thanks in advance! 🙂
1 Reply
Well, yes, it's a property, so
.UserName
is correct
I'd just make this property get-only