突然整理硬盘时找到了两年前写的一个网站,准备扔掉,但是还是把部分方法保留到博客吧!虽然现在对于自己已经用处不大,但是还是纪念一下!生成验证码:using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; u Read More
posted @ 2012-01-04 16:38 javawebsoa Views(248) Comments(0) Diggs(0)
//获取当前进程的完整路径,包含文件名(进程名)。 string str = this.GetType().Assembly.Location; result: X:\xxx\xxx\xxx.exe (.exe文件所在的目录+.exe文件名) //获取新的 Process 组件并将其与当前活动的进程关联的主模块的完整路径,包含文件名(进程名)。 string str = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName; result: X:\xxx\xxx\xxx.exe (.exe文件所在的目录+.exe. Read More
posted @ 2012-01-04 10:52 javawebsoa Views(216) Comments(0) Diggs(0)