Condividi tramite


Proprietà Property.Value

Ottiene o imposta il valore della proprietà restituita da l Property oggetto.

Spazio dei nomi:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Sintassi

'Dichiarazione
Default Property Value As Object
Object this { get; set; }
property Object^ default {
    Object^ get ();
    void set (Object^ value);
}
abstract Value : Object with get, set
function get Value () : Object
function set Value (value : Object)

Valore proprietà

Tipo: System.Object
un oggetto.

Note

Value la proprietà determina il valore predefinito per Property oggetto.Poiché restituisce un oggetto, qualsiasi tipo di proprietà è accessibile.Gli oggetti vengono restituiti come tipo di oggetto e le matrici restituite come matrici.In Property l'oggetto che rappresenta i valori più li restituisce con IndexedValuee il numero di valori viene restituito da NumIndices.impostare Value la proprietà funziona in modo appropriato, a seconda del tipo di valore.

Se la proprietà di Property l'oggetto rappresenta è lettura /scrittura in fase di progettazione, quindi Value la proprietà è di lettura/scrittura /scrittura.Se la proprietà è di sola lettura, il tentativo di impostare Value la proprietà provoca un errore.Se la proprietà è in sola scrittura, qualsiasi tentativo di restituire Value la proprietà provoca un errore.

Esempi

' Visual Studio macro.
Sub ValueExample()
   Dim Props As Properties
   Dim PropObj As [Property]
   Dim NameValPair As String
        
   Props = DTE.Properties("Environment", "General")
   MsgBox("Tools – Options – Environment – General Properties Count _
   = " & Props.Count())
   For Each PropObj In Props
     NameValPair = NameValPair & (PropObj.Name & "Value = " & _
     PropObj.Value.ToString & microsoft.VisualBasic.ControlChars.CrLf)
   Next
   MsgBox(NameValPair)
End Sub

Sicurezza di .NET Framework

Vedere anche

Riferimenti

Property Interfaccia

Spazio dei nomi EnvDTE