System.Web.Configuration.WebConfigurationManager.SafeGetSection C# (CSharp) Method

SafeGetSection() static private method

static private SafeGetSection ( string sectionName, Type configSectionType ) : object
sectionName string
configSectionType Type
return object
		internal static object SafeGetSection (string sectionName, Type configSectionType)
		{
			try {
				return GetSection (sectionName);
			} catch (Exception) {
				if (configSectionType != null)
					return Activator.CreateInstance (configSectionType);
				return null;
			}
		}
		

Same methods

WebConfigurationManager::SafeGetSection ( string sectionName, string path, Type configSectionType ) : object