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

ContextInformation

public sealed class ContextInformation
Encapsulates the context information that is associated with a ConfigurationElement object. This class cannot be inherited.
public object HostingContext { get; }

Gets the context of the environment where the configuration property is being evaluated.

public bool IsMachineLevel { get; }

Gets a value specifying whether the configuration property is being evaluated at the machine configuration level.

public object GetSection(string sectionName)

Provides an object containing configuration-section information based on the specified section name.