代码改变世界

文章分类 -  .Net

【DotNet Using】C#获取/设置程序运行目录【ZZ】

2009-06-10 20:22 by hyddd, 895 阅读, 收藏,
摘要: 原文:http://blog.sina.com.cn/s/blog_43aea3250100b9pu.html第一种方法: string AppPath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase; if (AppPath.EndsWith("\\") || AppPath.EndsWith("/")) AppPath= A... 阅读全文

【DotNet Using】用C#获取当前函数名,当前代码行,源代码文件名【ZZ】

2009-06-10 19:55 by hyddd, 6685 阅读, 收藏,
摘要: 原文:http://blog.csdn.net/21aspnet/archive/2008/12/15/3522152.aspx一.获取当前函数名:[代码]结果:Test at offset 72 in file:line:column <filename unknown>:0:0,Test就是当前函数。二.获取源码文件名,当前函数,当前代码行,列:[代码] 阅读全文