CodeCommentStatement 클래스

정의

단일 주석으로 구성된 문을 나타냅니다.

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
상속
CodeCommentStatement
특성

예제

이 예제에서는 소스 코드에서 주석을 CodeCommentStatement 나타내는 데 사용하는 방법을 보여 줍니다.

// 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

설명

CodeCommentStatement 는 한 줄 주석 문을 나타내는 데 사용할 수 있습니다. CodeCommentStatement 은 문 컬렉션에 삽입할 수 있으므로 문 컬렉션에 삽입할 수 있으며 자체 줄에 표시됩니다. CodeCommentStatement 의 주석 컬렉션 CodeNamespace 또는 에서 파생 CodeTypeMember되는 모든 개체에 추가할 수도 있습니다.

생성자

Name Description
CodeCommentStatement()

CodeCommentStatement 클래스의 새 인스턴스를 초기화합니다.

CodeCommentStatement(CodeComment)

지정된 주석을 사용하여 클래스의 CodeCommentStatement 새 인스턴스를 초기화합니다.

CodeCommentStatement(String, Boolean)

지정된 텍스트 및 설명서 주석 플래그를 사용하여 클래스의 CodeCommentStatement 새 인스턴스를 초기화합니다.

CodeCommentStatement(String)

지정된 텍스트를 내용으로 사용하여 클래스의 CodeCommentStatement 새 인스턴스를 초기화합니다.

속성

Name Description
Comment

주석의 내용을 가져오거나 설정합니다.

EndDirectives

CodeDirectiveCollection 끝 지시문을 포함하는 개체를 가져옵니다.

(다음에서 상속됨 CodeStatement)
LinePragma

코드 문이 발생하는 줄을 가져오거나 설정합니다.

(다음에서 상속됨 CodeStatement)
StartDirectives

CodeDirectiveCollection 시작 지시문을 포함하는 개체를 가져옵니다.

(다음에서 상속됨 CodeStatement)
UserData

현재 개체에 대한 사용자 정의 데이터를 가져옵니다.

(다음에서 상속됨 CodeObject)

메서드

Name Description
Equals(Object)

지정한 개체와 현재 개체가 같은지 여부를 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보