System.Web.Security.SqlMembershipProvider.GetBoolConfigValue C# (CSharp) Method

GetBoolConfigValue() private method

private GetBoolConfigValue ( NameValueCollection config, string name, bool def ) : bool
config System.Collections.Specialized.NameValueCollection
name string
def bool
return bool
		bool GetBoolConfigValue (NameValueCollection config, string name, bool def)
		{
			bool rv = def;
			string val = config [name];
			if (val != null) {
				try { rv = Boolean.Parse (val); }
				catch (Exception e) {
					throw new ProviderException (String.Format ("{0} must be true or false", name), e);
				}
			}
			return rv;
		}