System.Attribute.Attribute.CheckParameters C# (CSharp) Method

CheckParameters() private static method

private static CheckParameters ( object element, Type attributeType ) : void
element object
attributeType Type
return void
		private static void CheckParameters (object element, Type attributeType)
		{
			// neither parameter is allowed to be null
			if (element == null)
				throw new ArgumentNullException ("element");

			if (attributeType == null)
				throw new ArgumentNullException ("attributeType");

			if (!typeof (Attribute).IsAssignableFrom (attributeType))
				throw new ArgumentException (Locale.GetText (
					"Type is not derived from System.Attribute."), "attributeType");
		}