VCCodeEvent.IsReadOnly Özellik

Tanım

Nesneyi içeren dosyanın salt okunurdur olduğunu gösteren bir değer alır.

public:
 property bool IsReadOnly { bool get(); };
public:
 property bool IsReadOnly { bool get(); };
[System.Runtime.InteropServices.DispId(514)]
public bool IsReadOnly { [System.Runtime.InteropServices.DispId(514)] [System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)] get; }
[<System.Runtime.InteropServices.DispId(514)>]
[<get: System.Runtime.InteropServices.DispId(514)>]
[<get: System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)>]
member this.IsReadOnly : bool
Public ReadOnly Property IsReadOnly As Boolean

Özellik Değeri

Boolean

true nesneyi içeren dosya salt okunurdur; Aksi takdirde, false .

Öznitelikler

Örnekler

Bu örnek, kod öğesine açıklama eklemeden önce dosyanın salt okunurdur.

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  

Açıklamalar

Bu örneği derlemek ve çalıştırmak hakkında bilgi için bkz. nasıl yapılır: Visual C++ Code Model genişletilebilirliği Için örnek kod derleme .

Şunlara uygulanır