共用方式為


AutoCompleteAttribute.Value 屬性

定義

取得值,指出 COM+ 中 AutoComplete 選項的設定。

public:
 property bool Value { bool get(); };
public bool Value { get; }
member this.Value : bool
Public ReadOnly Property Value As Boolean

屬性值

如果在 COM+ 中啟用 true,則為 AutoComplete,否則為 false。 預設為 true

範例

下列程式代碼範例會 AutoComplete 取得屬性的 Value 屬性值。

[AutoComplete(false)]
public void AutoCompleteAttribute_Value()
{
    // Get information on the member.
    System.Reflection.MemberInfo[] memberinfo =
        this.GetType().GetMember(
        "AutoCompleteAttribute_Value");

    // Get the AutoCompleteAttribute applied to the member.
    AutoCompleteAttribute attribute =
        (AutoCompleteAttribute)System.Attribute.GetCustomAttribute(
        memberinfo[0],
        typeof(AutoCompleteAttribute),
        false);

    // Display the value of the attribute's Value property.
    Console.WriteLine("AutoCompleteAttribute.Value: {0}", attribute.Value);
}
<AutoComplete(False)>  _
Public Sub AutoCompleteAttribute_Value() 
    ' Get information on the member.
    Dim memberinfo As System.Reflection.MemberInfo() = Me.GetType().GetMember("AutoCompleteAttribute_Value")
    
    ' Get the AutoCompleteAttribute applied to the member.
    Dim attribute As AutoCompleteAttribute = CType(System.Attribute.GetCustomAttribute(memberinfo(0), GetType(AutoCompleteAttribute), False), AutoCompleteAttribute)
    
    ' Display the value of the attribute's Value property.
    MsgBox("AutoCompleteAttribute.Value: " & attribute.Value)

End Sub

適用於