CodeObjectCreateExpression 클래스

정의

형식의 새 인스턴스를 만드는 식을 나타냅니다.

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

예제

다음 예제에서는 를 사용하여 CodeObjectCreateExpression 매개 변수가 없는 생성자를 사용하여 System.DateTime 클래스의 새 instance 만드는 방법을 보여 줍니다.

array<CodeExpression^>^temp0 = gcnew array<CodeExpression^>(0);
CodeObjectCreateExpression^ objectCreate1 = gcnew CodeObjectCreateExpression( "System.DateTime",temp0 );

// A C# code generator produces the following source code for the preceeding example code:
//        new System.DateTime();
CodeObjectCreateExpression objectCreate1 = new CodeObjectCreateExpression( "System.DateTime", new CodeExpression[] {} );

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

//        new System.DateTime();
Dim objectCreate1 As New CodeObjectCreateExpression("System.DateTime", New CodeExpression() {})

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

'       New Date

설명

CodeObjectCreateExpression는 형식의 instance 만드는 식을 나타내는 데 사용할 수 있습니다.

속성은 CreateType 새 instance 만들 데이터 형식을 지정합니다. 속성은 Parameters 형식의 생성자에 전달할 매개 변수를 지정하여 의 새 instance 만듭니다.

생성자

CodeObjectCreateExpression()

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

CodeObjectCreateExpression(CodeTypeReference, CodeExpression[])

지정된 형식과 매개 변수를 사용하여 CodeObjectCreateExpression 클래스의 새 인스턴스를 초기화합니다.

CodeObjectCreateExpression(String, CodeExpression[])

지정된 형식과 매개 변수를 사용하여 CodeObjectCreateExpression 클래스의 새 인스턴스를 초기화합니다.

CodeObjectCreateExpression(Type, CodeExpression[])

지정된 형식과 매개 변수를 사용하여 CodeObjectCreateExpression 클래스의 새 인스턴스를 초기화합니다.

속성

CreateType

만들 개체의 데이터 형식을 가져오거나 설정합니다.

Parameters

개체를 만드는 데 사용할 매개 변수를 가져오거나 설정합니다.

UserData

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

(다음에서 상속됨 CodeObject)

메서드

Equals(Object)

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

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

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

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

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

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

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

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

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

(다음에서 상속됨 Object)

적용 대상