<PackageReference Include="System.Configuration.ConfigurationManager" Version="10.0.0" />

System.Configuration.AppSettingsReader

public class AppSettingsReader
Provides a method for reading values of a particular type from the configuration.

Initializes a new instance of the AppSettingsReader class.

public object GetValue(string key, Type type)

Gets the value for a specified key from the AppSettings property and returns an object of the specified type containing the value from the configuration.