다음을 통해 공유


CodeTypeReferenceExpression 클래스

정의

데이터 형식에 대한 참조를 나타냅니다.

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

예제

다음 예제에서는 형식에 대한 참조를 CodeTypeReferenceExpression 나타내는 데 사용하는 방법을 보여 줍니다.

// Creates an expression referencing the System.DateTime type.
CodeTypeReferenceExpression typeRef1 = new CodeTypeReferenceExpression("System.DateTime");

// Create a C# code provider
CodeDomProvider provider = CodeDomProvider.CreateProvider("CSharp");

// Generate code and send the output to the console
provider.GenerateCodeFromExpression(typeRef1, Console.Out, new CodeGeneratorOptions());
// The code generator produces the following source code for the preceeding example code:

//    System.DateTime
' Creates an expression referencing the System.DateTime type.
Dim typeRef1 As new CodeTypeReferenceExpression("System.DateTime")

' Create a Visual Basic code provider
Dim provider As CodeDomProvider = CodeDomProvider.CreateProvider("VisualBasic")

' Generate code and send the output to the console
provider.GenerateCodeFromExpression(typeRef1, Console.Out, New CodeGeneratorOptions())
' The code generator produces the following source code for the preceeding example code:

'    Date

설명

CodeTypeReferenceExpression 는 특정 데이터 형식을 참조하는 데 사용할 수 있습니다.

이 속성은 Type 참조할 데이터 형식을 지정합니다.

생성자

Name Description
CodeTypeReferenceExpression()

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

CodeTypeReferenceExpression(CodeTypeReference)

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

CodeTypeReferenceExpression(String)

지정된 데이터 형식 이름을 사용하여 클래스의 CodeTypeReferenceExpression 새 인스턴스를 초기화합니다.

CodeTypeReferenceExpression(Type)

지정된 데이터 형식을 사용하여 클래스의 CodeTypeReferenceExpression 새 인스턴스를 초기화합니다.

속성

Name Description
Type

참조할 데이터 형식을 가져오거나 설정합니다.

UserData

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

(다음에서 상속됨 CodeObject)

메서드

Name Description
Equals(Object)

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

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

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

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

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

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

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

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

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

(다음에서 상속됨 Object)

적용 대상