Assembly的属性值

2017-10-14 23:39:31  访问(1958) 赞(0) 踩(0)


  • ass.ToString() = SlowX.Core, Version=1.17.823.1, Culture=neutral, PublicKeyToken=null
    ass.CodeBase = file:///D:/Projects/SlowX/SlowX/Code/SRC/SlowXWebSite/WebSite/bin/SlowX.Core.DLL
    ass.EscapedCodeBase = file:///D:/Projects/SlowX/SlowX/Code/SRC/SlowXWebSite/WebSite/bin/SlowX.Core.DLL
    ass.FullName = SlowX.Core, Version=1.17.823.1, Culture=neutral, PublicKeyToken=null
    ass.EntryPoint = null
    ass.Evidence = System.Security.Policy.Evidence
    ass.ManifestModule = SlowX.Core.dll
    ass.ReflectionOnly = False
    ass.Location = C:\Users\SX\AppData\Local\Temp\Temporary ASP.NET Files\website\ae5549aa\9896ba07\assembly\dl3\84e2f64c\54687719_ea44d301\SlowX.Core.DLL
    ass.ImageRuntimeVersion = v2.0.50727
    ass.GlobalAssemblyCache = False
    ass.HostContext = 0
  • 
            Type t = typeof(SlowX.Core.Business.BaseBusiness);
    
            Assembly ass = t.Assembly;
    
            Response.Write("ass.ToString() = " + ass.ToString() + "<br />");
    
            Type assT = ass.GetType();
    
            PropertyInfo[] pA = ass.GetType().GetProperties();
    
            object obj = null;
    
            foreach (PropertyInfo p in pA)
            {
                if (!p.CanRead)
                    continue;
    
                obj = p.GetValue(ass, null);
    
                if (obj == null)
                    Response.Write("ass." + p.Name + " = null" + "<br />");
                else
                    Response.Write("ass." + p.Name + " = "+obj.ToString()+"<br />");
            }
    

上一条:

下一条:


 

相关评论

评论加载中……
 

发表评论

类型:
内容:
  (Alt+Enter)