Share via


CodeCommentStatement Sınıf

Tanım

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

public ref class CodeCommentStatement : System::CodeDom::CodeStatement
public 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
type CodeCommentStatement = class
    inherit 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 örnekte, kaynak kodunda açıklamayı temsil etmek için bir CodeCommentStatement kullanımı gösterilmektedir.

// Create a CodeComment with some example comment text.

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

// Create a CodeCommentStatement that contains the comment, in order
// to add the comment to a CodeTypeDeclaration Members collection.
CodeCommentStatement^ commentStatement = gcnew 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.
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 deyimidir, 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

CodeCommentStatement()

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

CodeCommentStatement(CodeComment)

Belirtilen açıklamayı CodeCommentStatement kullanarak sınıfını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.

CodeCommentStatement(String, Boolean)

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

Özellikler

Comment

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

EndDirectives

Bitiş 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

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()

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

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

Geçerli Objectöğesinin sığ bir kopyasını oluşturur.

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

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

(Devralındığı yer: Object)

Şunlara uygulanır

Ayrıca bkz.