2012/04/26

Tips-ASP.NET 如何查詢載入組件的版本

程式很簡單,如下,存成 aspx 即可查詢

<%@ page language="C#" trace="true" autoeventwireup="true" %>
<script language="C#" runat="server">
            void Page_Load()
            {
                AppDomain MyDomain = AppDomain.CurrentDomain;
                System.Reflection.Assembly[] AssembliesLoaded = MyDomain.GetAssemblies();

                foreach (System.Reflection.Assembly MyAssembly in AssembliesLoaded)
                {
                    Response.Write("Loaded: "+ MyAssembly.FullName +"<br/>");
                }
            }
</script>

 

 

原文參考:http://www.dijksterhuis.org/show-assemblies-loaded-program/

沒有留言: