public WebRequestPrefixElement(string P, Type creatorType) { // verify that its of the proper type of IWebRequestCreate if (!typeof(IWebRequestCreate).IsAssignableFrom(creatorType)) { throw new InvalidCastException(SR.GetString(SR.net_invalid_cast, creatorType.AssemblyQualifiedName, "IWebRequestCreate")); } Prefix = P; this.creatorType = creatorType; }