RemoteArgument Constructor (RemoteArgumentKind, TypeCode, Boolean)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of the RemoteArgument class using the specified RemoteArgumentKind and TypeCode for an argument that can be passed by reference.

Namespace:   System.AddIn.Contract
Assembly:  System.AddIn.Contract (in System.AddIn.Contract.dll)

public RemoteArgument(
	RemoteArgumentKind remoteArgKind,
	TypeCode typeCode,
	bool isByRef
)

Parameters

remoteArgKind
Type: System.AddIn.Contract.RemoteArgumentKind

One of the RemoteArgumentKind values that indicates whether the RemoteArgument represents an intrinsic type, an array of intrinsic types, an IContract, or the Type.Missing value.

typeCode
Type: System.TypeCode

A TypeCode that specifies the base type of the remote argument.

isByRef
Type: System.Boolean

true if the remote argument is passed by reference; otherwise, false.

Exception Condition
ArgumentException

remoteArgKind is Intrinsic or IntrinsicArray, and typeCode is TypeCode.Object or TypeCode.Empty.

-or-

remoteArgKind is Missing and typeCode is not TypeCode.Empty.

-or-

remoteArgKind is Contract and typeCode is not TypeCode.Object.

InvalidOperationException

remoteArgKind is not a valid RemoteArgumentKind value.

This constructor assigns the default value of the data type specified by the typeCode parameter to the RemoteArgument.

An intrinsic data type is a primitive data type (that is, the Type.IsPrimitive property of the type is true) or a String, Decimal, DateTime, or DBNull.

.NET Framework
Available since 3.5
Return to top
Show: