文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>判断dll是版本(Debug Or Release)[测试通过]

判断dll是版本(Debug Or Release)[测试通过]

时间:2011-02-16  来源:Stone_W

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Assembly ass
= Assembly.LoadFile(@"D:\com.uuu9.api.dll");
DebuggableAttribute att
= Utils.GetCustomAttribute<DebuggableAttribute>(ass);
Response.Write(att.IsJITTrackingEnabled
? "Debug" : "Release");
}
}

}

public static class Utils
{
public static T GetCustomAttribute<T>(this ICustomAttributeProvider provider)
where T : Attribute
{
var attributes
= provider.GetCustomAttributes(typeof(T), false);
return attributes.Length > 0 ? attributes[0] as T : default(T);
}
}
相关阅读 更多 +
排行榜 更多 +
龙珠格斗火柴人

龙珠格斗火柴人

飞行射击 下载
荒野恐龙猎手安卓版

荒野恐龙猎手安卓版

飞行射击 下载
超凡坦克英雄

超凡坦克英雄

飞行射击 下载