随笔分类 - .NET
摘要:using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; namespace ConsoleTest { class Program { class Test { ...
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; class test { public void Method()//1 { Console.WriteLine("1:__" + "Metho...
阅读全文
摘要:1.下载Log4Net: http://logging.apache.org/log4net/download_log4net.cgi 2.新建一个WinForm程序,取名Log4NetDemo 3.选择对应的dll文件,并解压log4net.dll,比如我的目标框架是4.5.2,所以需要dll文件
阅读全文
摘要:(1)这两个方法的最大不同是它们对null值的处理方法: Convert.ToInt32(null)会返回0而不会产生任何异常,但int.Parse(null)则会产生异常。 没搞清楚Convert.ToInt32和int.Parse()的细细微区别时别乱用,否则可能会产生无法预料的结果,举例来说:
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using IWshRuntimeLibrary;//添加引用(com->Wi...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace 进制转换{ class Program { ...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace 进制转换{ class Program { ...
阅读全文
摘要:注册控件 首先要插入Flash就必须使用Flash控件,在工具栏右键选择"选择项…",然后在"COM组件"面板下点击"浏览"按钮,在本机电脑C:\WINDOWS\system32\Macromed\Flash\目录里选择Flash10x.ocx(也有可能是Flash10v.ocx或flash10p....
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Diagnostics;//Debug用using System.Drawing;usin...
阅读全文
摘要:using System;using System.IO;using System.Text;/// /// 用于取得一个文本文件的编码方式(Encoding)。 /// public class TxtFileEncoder{ public TxtFileEncoder() ...
阅读全文
摘要:namespace WindowsFormsApplication1{ public partial class Form1 : Form { public Form1() { InitializeComponent(); ...
阅读全文
摘要:新建console程序,复制粘贴直接运行: /**/ //using System.Globalization;//代码测试大致时间2015/11/3 15:09:05 //方法一:Convert.ToDateTime(string)...
阅读全文
摘要://用.NET下托管语言C#操作注册表,主要内容包括:注册表项的创建,打开与删除、键值的创建(设置值、修改),读取和删除、判断注册表项是否存在、判断键值是否存在.//准备工作://1:要操作注册表,我们必须要引入必要的命名空间:using Microsoft.Win32;在这个命名空间里面包含了许多...
阅读全文
摘要:在XP时代,有一个快速启动栏,创建快捷方式只需要把快捷方式放在“%AppData%\Roaming\Microsoft\Internet Explorer\Quick Launch”文件夹下即可,如果要在WIN7/8的任务栏上创建快捷方式,只需要注意[HKEY_CURRENT_USER\Soft...
阅读全文