C#C
C#2y ago
SWEETPONY

How to check options for null?

I have this:
var options = Configuration.GetSection(nameof(Patterns));
services.Configure<Patterns>(options);                   


in controller:
public ZeebeController(
  KafkaSettings kafkaSettings,
  IZeebeClient zeebeClient,
  IOptions<Patterns> options)
{ 
}


all I want is check options from startup for null but I can't just write
if(options == null)
404ecf201c2e7a8e.png
Was this page helpful?