Add

KnownTypeSet.Add method

Adds the specified Type object to the set.

Throws ArgumentException in the following cases:

  • type is null.

  • type represents a void type.

  • type represents an invisible type, i.e. a non-public type or a public nested type which has a non-public outer type.

  • type represents a generic type.

  • type represents an array type.

  • type has been added to the set already.

public void Add(Type type)
Parameter Type Description
type Type A Type object to add.

See Also