RemoteArgument.CreateRemoteArgument Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a RemoteArgument for an argument.
CreateRemoteArgument(Object) |
Creates a RemoteArgument for an argument that is not passed by reference. |
CreateRemoteArgument(Object, Boolean) |
Creates a RemoteArgument for an argument that can be passed by reference. |
CreateRemoteArgument(Object, Boolean, TypeCode) |
Creates a RemoteArgument for an argument that has the specified type code and that can be passed by reference. |
Creates a RemoteArgument for an argument that is not passed by reference.
public:
static System::AddIn::Contract::RemoteArgument CreateRemoteArgument(System::Object ^ value);
public static System.AddIn.Contract.RemoteArgument CreateRemoteArgument (object value);
static member CreateRemoteArgument : obj -> System.AddIn.Contract.RemoteArgument
Public Shared Function CreateRemoteArgument (value As Object) As RemoteArgument
Parameters
- value
- Object
The argument that will be passed across process or application domain boundaries.
Returns
A RemoteArgument that represents the specified argument.
Exceptions
value
is null
.
The TypeCode of value
is Object and value
is not an IContract.
-or-
The TypeCode of value
is Empty and value
is not set to Value.
-or-
value
does not implement the IConvertible interface and value
is not an Array.
-or-
value
is an Array that contains elements with a TypeCode value of Object.
Remarks
This method calls the RemoteArgument constructor that applies to the type of the value
parameter.
Applies to
.NET Framework 4.8.1 and other versions
Product | Versions |
---|---|
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Creates a RemoteArgument for an argument that can be passed by reference.
public:
static System::AddIn::Contract::RemoteArgument CreateRemoteArgument(System::Object ^ value, bool isByRef);
public static System.AddIn.Contract.RemoteArgument CreateRemoteArgument (object value, bool isByRef);
static member CreateRemoteArgument : obj * bool -> System.AddIn.Contract.RemoteArgument
Public Shared Function CreateRemoteArgument (value As Object, isByRef As Boolean) As RemoteArgument
Parameters
- value
- Object
The argument that will be passed across process or application domain boundaries.
- isByRef
- Boolean
true
to pass the value
argument by reference; otherwise, false
.
Returns
A RemoteArgument that represents the specified argument.
Exceptions
value
is null
.
The TypeCode of value
is Object and value
is not an IContract.
-or-
The TypeCode of value
is Empty and value
is not set to Value.
-or-
value
does not implement the IConvertible interface and value
is not an Array.
-or-
value
is an Array that contains elements with a TypeCode value of Object.
Remarks
This method calls the RemoteArgument constructor that applies to the type of the value
parameter.
Applies to
.NET Framework 4.8.1 and other versions
Product | Versions |
---|---|
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Creates a RemoteArgument for an argument that has the specified type code and that can be passed by reference.
public:
static System::AddIn::Contract::RemoteArgument CreateRemoteArgument(System::Object ^ value, bool isByRef, TypeCode typeCodeToUse);
public static System.AddIn.Contract.RemoteArgument CreateRemoteArgument (object value, bool isByRef, TypeCode typeCodeToUse);
static member CreateRemoteArgument : obj * bool * TypeCode -> System.AddIn.Contract.RemoteArgument
Public Shared Function CreateRemoteArgument (value As Object, isByRef As Boolean, typeCodeToUse As TypeCode) As RemoteArgument
Parameters
- value
- Object
The argument that will be passed across process or application domain boundaries.
- isByRef
- Boolean
true
to pass the argument by reference; otherwise, false
.
- typeCodeToUse
- 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
.
Returns
A RemoteArgument that represents the specified argument.
Exceptions
The TypeCode of value
is Object, value
is not an IContract, and value
is not null
.
-or-
The TypeCode of value
is Empty and value
is not 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 Object.
typeCodeToUse
does not specify a valid TypeCode value.
Remarks
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.
Applies to
.NET Framework 4.8.1 and other versions
Product | Versions |
---|---|
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: