CodeCommentStatement Sınıf

Tanım

Tek bir açıklamadan oluşan bir deyimi temsil eder.

public ref class CodeCommentStatement : System::CodeDom::CodeStatement
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class CodeCommentStatement : System.CodeDom.CodeStatement
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type CodeCommentStatement = class
    inherit CodeStatement
Public Class CodeCommentStatement
Inherits CodeStatement
Devralma
CodeCommentStatement
Öznitelikler

Örnekler

Bu örnek, kaynak kodda açıklamayı temsil etmek için bir kullanmayı CodeCommentStatement gösterir.

// Create a CodeComment with some example comment text.
CodeComment comment = new CodeComment(
    // The text of the comment.
    "This comment was generated from a System.CodeDom.CodeComment",
    // Whether the comment is a comment intended for documentation purposes.
    false );

// Create a CodeCommentStatement that contains the comment, in order
// to add the comment to a CodeTypeDeclaration Members collection.
CodeCommentStatement commentStatement = new CodeCommentStatement( comment );

// A C# code generator produces the following source code for the preceeding example code:

// // This comment was generated from a System.CodeDom.CodeComment
     ' Create a CodeComment with some example comment text.
     Dim comment As New CodeComment( _
        "This comment was generated from a System.CodeDom.CodeComment", _
        False) ' Whether the comment is a documentation comment.
     
     ' Create a CodeCommentStatement that contains the comment, in order
     ' to add the comment to a CodeTypeDeclaration Members collection.
     Dim commentStatement As New CodeCommentStatement(comment)	

     ' A Visual Basic code generator produces the following source code for the preceeding example code:

     ' 'This comment was generated from a System.CodeDom.CodeComment

Açıklamalar

CodeCommentStatement tek satırlı açıklama deyimini temsil etmek için kullanılabilir. CodeCommentStatement bir deyimdir, bu nedenle deyim koleksiyonuna eklenebilir ve kendi satırında görünür. CodeCommentStatementveya öğesinden CodeTypeMembertüretilen herhangi bir nesnenin CodeNamespace açıklama koleksiyonuna da eklenebilir.

Oluşturucular

Name Description
CodeCommentStatement()

CodeCommentStatement sınıfının yeni bir örneğini başlatır.

CodeCommentStatement(CodeComment)

Belirtilen açıklamayı kullanarak sınıfın CodeCommentStatement yeni bir örneğini başlatır.

CodeCommentStatement(String, Boolean)

Belirtilen metin ve belge açıklama bayrağını CodeCommentStatement kullanarak sınıfın yeni bir örneğini başlatır.

CodeCommentStatement(String)

Belirtilen metni içerik olarak kullanarak sınıfın CodeCommentStatement yeni bir örneğini başlatır.

Özellikler

Name Description
Comment

Açıklamanın içeriğini alır veya ayarlar.

EndDirectives

End yönergelerini içeren bir CodeDirectiveCollection nesnesi alır.

(Devralındığı yer: CodeStatement)
LinePragma

Kod deyiminin oluştuğu satırı alır veya ayarlar.

(Devralındığı yer: CodeStatement)
StartDirectives

Başlangıç yönergelerini içeren bir CodeDirectiveCollection nesnesi alır.

(Devralındığı yer: CodeStatement)
UserData

Geçerli nesne için kullanıcı tarafından tanımlanabilir verileri alır.

(Devralındığı yer: CodeObject)

Yöntemler

Name Description
Equals(Object)

Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.

(Devralındığı yer: Object)
GetHashCode()

Varsayılan karma işlevi işlevi görür.

(Devralındığı yer: Object)
GetType()

Geçerli örneğin Type alır.

(Devralındığı yer: Object)
MemberwiseClone()

Geçerli Objectbasit bir kopyasını oluşturur.

(Devralındığı yer: Object)
ToString()

Geçerli nesneyi temsil eden bir dize döndürür.

(Devralındığı yer: Object)

Şunlara uygulanır

Ayrıca bkz.