■ 어셈블리 제품 구하기
------------------------------------------------------------------------------------------------------------------------
using System.Reflection;
#region 어셈블리 제품 구하기 - GetAssemblyProduct(assembly)
/// <summary>
/// 어셈블리 제품 구하기
/// </summary>
/// <param name="assembly">어셈블리</param>
/// <returns>어셈블리 제품</returns>
public string GetAssemblyProduct(Assembly assembly)
{
object[] customAttributeArray = assembly.GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
if(customAttributeArray == null || customAttributeArray.Length == 0)
{
return null;
}
AssemblyProductAttribute assemblyProductAttribute = customAttributeArray[0] as AssemblyProductAttribute;
return assemblyProductAttribute.Product;
}
#endregion
------------------------------------------------------------------------------------------------------------------------
'C# > Common' 카테고리의 다른 글
[C#/COMMON] 시간 문자열 구하기 (0) | 2014.12.15 |
---|---|
[C#/COMMON] 말일 여부 조사하기 (0) | 2014.12.15 |
[C#/COMMON] 윤년 여부 조사하기 (0) | 2014.12.15 |
[C#/COMMON] 어셈블리 저작권 구하기 (0) | 2014.12.15 |
[C#/COMMON] 어셈블리 파일 버전 구하기 (0) | 2014.12.15 |
[C#/COMMON] 어셈블리 제품 구하기 (0) | 2014.12.15 |
[C#/COMMON] 어셈블리 타이틀 구하기 (0) | 2014.12.15 |
[C#/COMMON] HashSet 클래스 사용하기 (0) | 2014.12.05 |
[C#/COMMON] List<T> 클래스 : 배열의 중복된 값 제거하기 (0) | 2014.12.05 |
[C#/COMMON] IFormatProvider 인터페이스, ICustomFormatter 인터페이스 : 성별 포매터 구현하기 (0) | 2014.12.05 |
[C#/COMMON] OrderByDescending 확장 메소드를 사용해 요소 내림차순 정렬하기 (0) | 2014.12.04 |
댓글을 달아 주세요