Export (0) Print
Expand All

RemoteArgument.CreateRemoteArgument Method (Object, Boolean, TypeCode)

Creates a RemoteArgument for an argument that has the specified type code and that can be passed by reference.

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

public static RemoteArgument CreateRemoteArgument(
	Object value,
	bool isByRef,
	TypeCode typeCodeToUse
)

Parameters

value
Type: System.Object

The argument that will be passed across process or application domain boundaries.

isByRef
Type: System.Boolean

true to pass the argument by reference; otherwise, false.

typeCodeToUse
Type: System.TypeCode

A TypeCode that indicates the type code of value, if value is not an Array. Otherwise, a TypeCode that indicates the type code of the elements in value.

Return Value

Type: System.AddIn.Contract.RemoteArgument
A RemoteArgument that represents the specified argument.

ExceptionCondition
ArgumentException

The TypeCode of value is TypeCode.Object, value is not an IContract, and value is not null.

-or-

The TypeCode of value is TypeCode.Empty and value is not Missing.Value.

-or-

value does not implement the IConvertible interface, value is not null, and value is not an Array.

-or-

value is an Array that contains elements with a TypeCode value of TypeCode.Object.

NotSupportedException

The TypeCode of value is not TypeCode.DBNull and typeCodeToUse is TypeCode.DBNull.

InvalidOperationException

typeCodeToUse does not specify a valid TypeCode value.

This method calls the RemoteArgument constructor that applies to the type of the value parameter.

You cannot use this method to create a RemoteArgument that represents a null array that contains elements of intrinsic data types. 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

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft