MethodBuilder.SetCustomAttribute 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
사용자 지정 특성을 설정합니다.
오버로드
| Name | Description |
|---|---|
| SetCustomAttribute(CustomAttributeBuilder) |
사용자 지정 특성 작성기를 사용하여 사용자 지정 특성을 설정합니다. |
| SetCustomAttribute(ConstructorInfo, Byte[]) |
지정된 사용자 지정 특성 blob을 사용하여 사용자 지정 특성을 설정합니다. |
SetCustomAttribute(CustomAttributeBuilder)
- Source:
- MethodBuilder.cs
- Source:
- MethodBuilder.cs
- Source:
- MethodBuilder.cs
- Source:
- MethodBuilder.cs
사용자 지정 특성 작성기를 사용하여 사용자 지정 특성을 설정합니다.
public:
void SetCustomAttribute(System::Reflection::Emit::CustomAttributeBuilder ^ customBuilder);
public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder);
member this.SetCustomAttribute : System.Reflection.Emit.CustomAttributeBuilder -> unit
Public Sub SetCustomAttribute (customBuilder As CustomAttributeBuilder)
매개 변수
- customBuilder
- CustomAttributeBuilder
사용자 지정 특성을 설명하는 도우미 클래스의 인스턴스입니다.
예외
customBuilder이(가) null인 경우
현재 메서드에 대해 IsGenericMethod 속성은 true이지만 IsGenericMethodDefinition 속성은 false입니다.
설명
메서드는 SetCustomAttribute 두 메서드를 조합하여 SetImplementationFlags 사용할 때 메서드와 상호 작용할 수 있습니다. 자세한 내용은 메서드의 설명 섹션을 SetImplementationFlags 참조하세요.
적용 대상
SetCustomAttribute(ConstructorInfo, Byte[])
- Source:
- MethodBuilder.cs
- Source:
- MethodBuilder.cs
- Source:
- MethodBuilder.cs
- Source:
- MethodBuilder.cs
지정된 사용자 지정 특성 blob을 사용하여 사용자 지정 특성을 설정합니다.
public:
void SetCustomAttribute(System::Reflection::ConstructorInfo ^ con, cli::array <System::Byte> ^ binaryAttribute);
public void SetCustomAttribute(System.Reflection.ConstructorInfo con, byte[] binaryAttribute);
[System.Runtime.InteropServices.ComVisible(true)]
public void SetCustomAttribute(System.Reflection.ConstructorInfo con, byte[] binaryAttribute);
member this.SetCustomAttribute : System.Reflection.ConstructorInfo * byte[] -> unit
[<System.Runtime.InteropServices.ComVisible(true)>]
member this.SetCustomAttribute : System.Reflection.ConstructorInfo * byte[] -> unit
Public Sub SetCustomAttribute (con As ConstructorInfo, binaryAttribute As Byte())
매개 변수
- con
- ConstructorInfo
사용자 지정 특성에 대한 생성자입니다.
- binaryAttribute
- Byte[]
특성을 나타내는 바이트 blob입니다.
- 특성
예외
con 또는 binaryAttribute가 null인 경우
현재 메서드에 대해 IsGenericMethod 속성은 true이지만 IsGenericMethodDefinition 속성은 false입니다.
설명
형식 binaryAttribute을 지정하는 방법에 대한 자세한 내용은 CLI(공용 언어 인프라) 사양의 파티션 II의 메타데이터 사양을 참조하세요.
메서드는 SetCustomAttribute 두 메서드를 조합하여 SetImplementationFlags 사용할 때 메서드와 상호 작용할 수 있습니다. 자세한 내용은 메서드의 설명 섹션을 SetImplementationFlags 참조하세요.