I have one class Library Project for Payment. The live credential of client is on web.config file of website and this class library project will added in bin in form of dll. So How to get ConfigurationManager in Class Library So I can get credential of Client and make Payment
Generally a class in the library shouldn't be reading web.config directly and take settings in constructor.
However it is acceptable for library in some scenarios to read the web.config directly. For that you can define a custom configuration section or use WebConfigurationManager.AppSettings
You need to add reference to System.Web assembly and you need to include the namespace System.Web.Configuration in the file where you want to use configuration manager.