PSMemberInfoCollection<T>.Add Method

Definition

Overloads

Add(T)

Adds a member to this collection.

Add(T, Boolean)

Adds a member to this collection.

Add(T)

Adds a member to this collection.

public:
 abstract void Add(T member);
public abstract void Add (T member);
abstract member Add : 'T -> unit
Public MustOverride Sub Add (member As T)

Parameters

member
T

Member to be added.

Exceptions

When: adding a member to an PSMemberSet from the type configuration file or adding a member with a reserved member name or trying to add a member with a type not compatible with this collection or a member by this name is already present

For invalid arguments.

Applies to

Add(T, Boolean)

Adds a member to this collection.

public:
 abstract void Add(T member, bool preValidated);
public abstract void Add (T member, bool preValidated);
abstract member Add : 'T * bool -> unit
Public MustOverride Sub Add (member As T, preValidated As Boolean)

Parameters

member
T

Member to be added.

preValidated
Boolean

flag to indicate that validation has already been done on this new member. Use only when you can guarantee that the input will not cause any of the errors normally caught by this method.

Exceptions

When: adding a member to an PSMemberSet from the type configuration file or adding a member with a reserved member name or trying to add a member with a type not compatible with this collection or a member by this name is already present

For invalid arguments.

Applies to