기타 [vb.net] Assembly GUID 가져오기
페이지 정보

본문
Imports System.Runtime.InteropServices
Module _ASM_GUID_
    Public Function ASM_GUID() As String
        Dim asm As Reflection.Assembly = Reflection.Assembly.GetExecutingAssembly()
        ''The following line (part of the original answer) is misleading.
        ''**Do not** use it unless you want to return the System.Reflection.Assembly type's GUID.
        'getGUID = assembly.[GetType]().GUID.ToString()
        '//fea961de-2778-4732-8de0-9689305de95b
        ' The following is the correct code.
        Dim attribute = CType(asm.GetCustomAttributes(GetType(GuidAttribute), True)(0), GuidAttribute)
        Return attribute.Value
    End Function
End Module
- 이전글[vb.net] HtmlAgilityPack, Jurassic 을 활용한 JavaScript 활용 22.07.13
 - 다음글[vb.net] "하드코딩"과 "소프트코딩"(로딩) 22.06.29
 
댓글목록
등록된 댓글이 없습니다.



