随笔分类 -  C#

C# 语言特性、代码片段
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; using System.Windows.Forms; //获得当前网络时间并转化成本地时间,用法: DateTime netTime = GetNetTime.GMT2Local(GetN... 阅读全文
posted @ 2019-06-23 14:24 HerringL 阅读(348) 评论(0) 推荐(0)
摘要:使用示例 示例1:显示ipconfig信息 示例2:打开VS2010命令提示 string cmd =@"C:&cd C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC&vcvarsall.bat"; 示例3:使用sn.exe工具产生密钥对并 阅读全文
posted @ 2019-06-23 14:14 HerringL 阅读(1135) 评论(0) 推荐(0)
摘要:Webbrowser控件默认总是使用IE7内核兼容模式来显示网页内容,导致很多网页样式无法正常显示,例如IE7不兼容HTML5,解决方法是在注册表中为你的进程指定引用IE的版本号。 32位程序: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\In 阅读全文
posted @ 2019-06-23 13:27 HerringL 阅读(994) 评论(0) 推荐(0)
摘要:1 //定义类 2 public class MyClass 3 { 4 public int Property1 { get; set; } 5 } 6 static void Main() 7 { 8 MyClass tmp_Class = new MyClass(); 9 tmp_Class.Property1 = 2; 10 Type type = tm... 阅读全文
posted @ 2017-10-31 16:03 HerringL 阅读(585) 评论(1) 推荐(1)