다음을 통해 공유


AssemblyDescriptionAttribute 클래스

어셈블리에 대한 텍스트 설명을 제공합니다.

네임스페이스: System.Reflection
어셈블리: mscorlib(mscorlib.dll)

구문

‘선언
<ComVisibleAttribute(True)> _
<AttributeUsageAttribute(AttributeTargets.Assembly, Inherited:=False)> _
Public NotInheritable Class AssemblyDescriptionAttribute
    Inherits Attribute
‘사용 방법
Dim instance As AssemblyDescriptionAttribute
[ComVisibleAttribute(true)] 
[AttributeUsageAttribute(AttributeTargets.Assembly, Inherited=false)] 
public sealed class AssemblyDescriptionAttribute : Attribute
[ComVisibleAttribute(true)] 
[AttributeUsageAttribute(AttributeTargets::Assembly, Inherited=false)] 
public ref class AssemblyDescriptionAttribute sealed : public Attribute
/** @attribute ComVisibleAttribute(true) */ 
/** @attribute AttributeUsageAttribute(AttributeTargets.Assembly, Inherited=false) */ 
public final class AssemblyDescriptionAttribute extends Attribute
ComVisibleAttribute(true) 
AttributeUsageAttribute(AttributeTargets.Assembly, Inherited=false) 
public final class AssemblyDescriptionAttribute extends Attribute

설명

Microsoft Visual Studio 2005에서 프로젝트를 만들 때 이 특성은 자동으로 빈 문자열 값을 사용하여 적용됩니다. Visual Studio 2005의 파일 메뉴에서 프로젝트의 속성을 선택한 다음 어셈블리 정보를 클릭하여 이 특성 값을 설정할 수 있습니다. 이 특성은 프로젝트의 AssemblyInfo 파일에 저장되며 코드에서 이 특성을 지정하려면 먼저 이 파일에서 특성을 제거해야 합니다. 그렇지 않으면 특성을 여러 번 적용할 수 없다는 오류가 발생합니다.

이 특성은 Windows 탐색기에서 어셈블리 파일을 마우스 오른쪽 단추로 클릭한 후 액세스할 수 있는 파일 속성 대화 상자의 버전 탭에서 설명 값으로 나타납니다.

예제

다음 코드 예제에서는 간단한 어셈블리의 AssemblyDescriptionAttribute를 설정하고 이 특성이 정의되었는지 여부를 나타냅니다.

Imports System
Imports System.Reflection

<Assembly:AssemblyDescriptionAttribute("My Utility")> 

' Note: The suffix "Attribute" can be omitted:
' <Assembly: AssemblyTitle("A title examle")>

Public Class Test
    Public Shared Sub Main()

        '
        ' Get the assembly.
        Dim asm As [Assembly] = [Assembly].GetCallingAssembly

        ' Verify that the description is applied.
        Dim aType As Type = GetType(AssemblyDescriptionAttribute)

        Console.WriteLine("Description applied: {0}", asm.IsDefined(aType, False))

    End Sub
End Class

' The output is:
' Description Applied: True
'
using System;
using System.Reflection;

[assembly:AssemblyDescriptionAttribute("My Utility")]
public class Test {

    public static void Main() {
        //  Get the assembly.
        Assembly asm = Assembly.GetCallingAssembly();

        //  Verify that the description is applied.
        Type aType = typeof(AssemblyDescriptionAttribute);
        Console.WriteLine("Description applied: {0}", asm.IsDefined(aType, false));
    }
}
//  The output is:
//  Description Applied: True
//
//

상속 계층 구조

System.Object
   System.Attribute
    System.Reflection.AssemblyDescriptionAttribute

스레드로부터의 안전성

이 형식의 모든 public static(Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

.NET Compact Framework

2.0, 1.0에서 지원

참고 항목

참조

AssemblyDescriptionAttribute 멤버
System.Reflection 네임스페이스

기타 리소스

사용자 지정 특성 액세스