Aracılığıyla paylaş


VCCodeDelegate.IsReadOnly Özellik

Belirten bir değer alır mı içeren dosyanın VCCodeDelegate nesne salt okunur.

Ad alanı:  Microsoft.VisualStudio.VCCodeModel
Derleme:  Microsoft.VisualStudio.VCCodeModel (Microsoft.VisualStudio.VCCodeModel.dll içinde)

Sözdizimi

'Bildirim
ReadOnly Property IsReadOnly As Boolean
bool IsReadOnly { get; }
property bool IsReadOnly {
    bool get ();
}
abstract IsReadOnly : bool with get
function get IsReadOnly () : boolean

Özellik Değeri

Tür: Boolean
true varsa dosyayı içeren VCCodeDelegate nesnesi salt okunur; Aksi takdirde, false.

Notlar

Bkz: Nasıl yapılır: Visual C++ Kod Modeli Genişletilebilirliği için Örnek Kod Derleme bilgi derlemek ve bu örneği çalıştırmak nasıl.

Örnekler

Bu örnekte, dosya kod öğesi için açıklama eklemeden önce salt okunur olup olmadığını doğrular.

[Visual Basic]

Sub AddComment()
    Dim vcElement As VCCodeElement
    Dim vcElements As VCCodeElements
    Dim textPoint As TextPoint
    vcElements = DTE.Solution.Item(1).CodeModel.Classes
    vcElement = vcElements.Item(1)
    If (Not vcElement.IsReadOnly) Then
        vcElement.Comment = "This is a comment."
    End If
End Sub

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

VCCodeDelegate Arabirim

Microsoft.VisualStudio.VCCodeModel Ad Alanı