C#
carabbit
这个作者很懒,什么都没留下…
展开
-
C#、获取当前目录
System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;示例:X:\Codes\App\bin\Debug\App.vshost.exeSystem.Environment.CurrentDire原创 2011-07-31 07:58:40 · 390 阅读 · 0 评论 -
C#打开word
1、添加COM引用:Microsoft Word 12.0 Object Library2、using Microsoft.Office.Interop.Word3、 string filePath = System.IO.Directory.Get原创 2011-07-31 07:55:50 · 575 阅读 · 0 评论 -
C#多线程
static void Main(string[] args) { Thread thisThread = Thread.CurrentThread; thisThread.Name = "Main Thread"; ThreadStart workerStart = new T原创 2011-07-31 07:51:29 · 275 阅读 · 0 评论 -
C#、打开默认网页
System.Diagnostics.ProcessStartInfo("http://www.abc.com");原创 2011-07-31 07:56:57 · 803 阅读 · 0 评论 -
C#、获取命名空间、类名、方法名
取得当前方法命名空间System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Namespace取得当前方法类全名System.Reflection.MethodBase.GetCurrentMetho原创 2011-07-31 08:07:12 · 1145 阅读 · 0 评论 -
(int)和Int32.Parse(),Convert.ToInt32()三者的区别
(int)在对long 类型或是浮点型到int 类型的显式强制转换中使用,但是如果被转换的数值大于 Int32.MaxValue 或小于 Int32.MinValue,那么则会得到一个错误的结果。Int32.Parse()在符合数字格式的 string 到 i原创 2011-07-31 08:08:23 · 826 阅读 · 0 评论