C#C
C#4y ago
GNUGradyn

How do I check if a list in an IConfiguration has any values [Answered]

I am trying to do this
if (_config.GetValue<bool>("AutoRegisterSlashCommands:Dev") && _config.GetSection("DevServers").Get<ulong[]>().Any())


However this throws an ArgumentNullException if the configuration section is an empty list
Was this page helpful?