共用方式為


CodeDomSerializer.SerializeToReferenceExpression 方法

定義

警告

This method has been deprecated. Use SerializeToExpression or GetExpression instead. http://go.microsoft.com/fwlink/?linkid=14202

警告

This method has been deprecated. Use SerializeToExpression or GetExpression instead. https://go.microsoft.com/fwlink/?linkid=14202

序列化指定值為 CodeDOM 運算式。

protected:
 System::CodeDom::CodeExpression ^ SerializeToReferenceExpression(System::ComponentModel::Design::Serialization::IDesignerSerializationManager ^ manager, System::Object ^ value);
protected System.CodeDom.CodeExpression SerializeToReferenceExpression (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object value);
[System.Obsolete("This method has been deprecated. Use SerializeToExpression or GetExpression instead.  http://go.microsoft.com/fwlink/?linkid=14202")]
protected System.CodeDom.CodeExpression SerializeToReferenceExpression (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object value);
[System.Obsolete("This method has been deprecated. Use SerializeToExpression or GetExpression instead.  https://go.microsoft.com/fwlink/?linkid=14202")]
protected System.CodeDom.CodeExpression SerializeToReferenceExpression (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object value);
[System.Obsolete("This method has been deprecated. Use SerializeToExpression or GetExpression instead.  https://go.microsoft.com/fwlink/?linkid=14202")]
protected System.CodeDom.CodeExpression? SerializeToReferenceExpression (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object value);
member this.SerializeToReferenceExpression : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * obj -> System.CodeDom.CodeExpression
[<System.Obsolete("This method has been deprecated. Use SerializeToExpression or GetExpression instead.  http://go.microsoft.com/fwlink/?linkid=14202")>]
member this.SerializeToReferenceExpression : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * obj -> System.CodeDom.CodeExpression
[<System.Obsolete("This method has been deprecated. Use SerializeToExpression or GetExpression instead.  https://go.microsoft.com/fwlink/?linkid=14202")>]
member this.SerializeToReferenceExpression : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * obj -> System.CodeDom.CodeExpression
Protected Function SerializeToReferenceExpression (manager As IDesignerSerializationManager, value As Object) As CodeExpression

參數

manager
IDesignerSerializationManager

要在序列化期間使用的序列化管理員。

value
Object

要序列化的物件。

傳回

序列化的值。 如果無法為指定值取得參考運算式,或者值無法序列化,這會傳回 null

屬性

備註

這個方法類似於 SerializeToExpression,不同之處在於,如果它無法取得值的簡單參考表達式,就會停止。 當您預期產生的表達式做為語句的參數或目標時,請呼叫這個方法。

適用於