IRemoteObjectContract.RemoteCast(String) Method
Definition
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.
Casts the object identified by the current IRemoteObjectContract to a specified type.
public:
System::AddIn::Contract::RemoteArgument RemoteCast(System::String ^ canonicalName);
public System.AddIn.Contract.RemoteArgument RemoteCast (string canonicalName);
abstract member RemoteCast : string -> System.AddIn.Contract.RemoteArgument
Public Function RemoteCast (canonicalName As String) As RemoteArgument
Parameters
- canonicalName
- String
The canonical name of the type to cast the object to.
Returns
A RemoteArgument that represents the result of the cast operation.
Remarks
A canonical name is a globally unique name, such as a GUID. Strings in the format <assembly name>, <fully qualified type name> are recommended. An example of the recommended format of a canonical name is "ShapeApp, Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.Application".
The canonical name for a type cannot change after a type is published in a component. Changing the canonical name of a type in a future version of a component breaks compatibility between the component and clients that are already using the type.
It is recommended that RemoteCast implementations throw an InvalidCastException if the cast operation fails.
Applies to
Зворотний зв’язок
https://aka.ms/ContentUserFeedback.
Очікується незабаром: протягом 2024 року ми будемо припиняти використання механізму реєстрації проблем у GitHub для зворотного зв’язку щодо вмісту й замінювати його новою системою зворотного зв’язку. Докладніше:Надіслати й переглянути відгук про