Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to dynamically load value in startup file in c#

 public class FooController : Controller
 {
     private IOptions<FooConfig> _config;

     public FooController(IOptions<FooConfig> config)
     {
         _config = config ?? throw new ArgumentNullException(nameof(config));
     }

     ...
 }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dynamically #load #startup #file
ADD COMMENT
Topic
Name
9+1 =