다음을 통해 공유


CodeSnippetExpression 클래스

정의

리터럴 식을 나타냅니다.

public ref class CodeSnippetExpression : System::CodeDom::CodeExpression
public class CodeSnippetExpression : System.CodeDom.CodeExpression
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class CodeSnippetExpression : System.CodeDom.CodeExpression
type CodeSnippetExpression = class
    inherit CodeExpression
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type CodeSnippetExpression = class
    inherit CodeExpression
Public Class CodeSnippetExpression
Inherits CodeExpression
상속
CodeSnippetExpression
특성

예제

다음 코드 예제에서는 리터럴 코드 조각을 사용하여 클래스의 CodeSnippetExpression 인스턴스를 만드는 방법을 보여 줍니다.

// Creates a CodeSnippetExpression that represents a literal string that
// can be used as an expression in a CodeDOM graph.
CodeSnippetExpression literalExpression =
    new CodeSnippetExpression("Literal expression");
' Creates a CodeSnippetExpression that represents a literal string that
' can be used as an expression in a CodeDOM graph.
Dim literalExpression As New CodeSnippetExpression("Literal expression")

설명

리터럴 식은 식의 코드를 리터럴 코드 조각으로 저장합니다. CodeDOM은 리터럴 코드 조각을 변환하지 않습니다. 리터럴 코드 조각은 그대로 저장되고 출력됩니다. 개발자가 이미 대상 언어에 있는 코드를 캡슐화할 수 있도록 리터럴 코드를 포함하는 CodeDOM 개체가 제공됩니다.

Value 코드 조각 식에 대한 리터럴 코드가 속성에 포함되어 있습니다.

생성자

Name Description
CodeSnippetExpression()

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

CodeSnippetExpression(String)

지정된 리터럴 식을 사용하여 클래스의 CodeSnippetExpression 새 인스턴스를 초기화합니다.

속성

Name Description
UserData

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

(다음에서 상속됨 CodeObject)
Value

코드의 리터럴 문자열을 가져오거나 설정합니다.

메서드

Name Description
Equals(Object)

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

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

기본 해시 함수로 사용됩니다.

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

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

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

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

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

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

(다음에서 상속됨 Object)

적용 대상