wenyonk
asked on
ConfigurationException(string, System.Exception)' is obsolete
Please help!!
I have been unable to resolve the following warning: System.Configuration.Confi gurationEx ception.Co nfiguratio nException (string, System.Exception)' is obsolete: 'This class is obsolete, to create a new exception create a System.Configuration!Syste m.Configur ation.Conf igurationE rrorsExcep tion'
internal static void LogAndThrowException(Excep tion e)
{
string string1 = ResourceLoader.Instance.Ge tString(Re sourceName spaceEnum. ExceptionM essages, e.GetType().FullName, new object[0]);
throw new ConfigurationException((st ring1, e);
} // END: internal static void LogAndThrowException(Excep tion e)
I have been unable to resolve the following warning: System.Configuration.Confi
internal static void LogAndThrowException(Excep
{
string string1 = ResourceLoader.Instance.Ge
throw new ConfigurationException((st
} // END: internal static void LogAndThrowException(Excep
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
If worked after i added a reference to System.Configuration
I already added using System.Configuration but forgot to add the reference...
Thank you
I already added using System.Configuration but forgot to add the reference...
Thank you
You can try to throw new Exception instead of ConfigurationException