InstanceDescriptor Constructor (MemberInfo^, ICollection^)

 

Initializes a new instance of the InstanceDescriptor class using the specified member information and arguments.

Namespace:   System.ComponentModel.Design.Serialization
Assembly:  System (in System.dll)

public:
InstanceDescriptor(
	MemberInfo^ member,
	ICollection^ arguments
)

Parameters

member
Type: System.Reflection::MemberInfo^

The member information for the descriptor. This can be a MethodInfo, ConstructorInfo, FieldInfo, or PropertyInfo. If this is a MethodInfo, FieldInfo, or PropertyInfo, it must represent a static member.

arguments
Type: System.Collections::ICollection^

The collection of arguments to pass to the member. This parameter can be null or an empty collection if there are no arguments. The collection can also consist of other instances of InstanceDescriptor.

Exception Condition
ArgumentException

member is of type MethodInfo, FieldInfo, or PropertyInfo, and it does not represent a static member.

member is of type PropertyInfo and is not readable.

member is of type MethodInfo or ConstructorInfo, and the number of arguments in arguments does not match the signature of member.

member is of type ConstructorInfo and represents a static member.

member is of type FieldInfo, and the number of arguments in arguments is not zero.

.NET Framework
Available since 1.1
Return to top
Show: