文章分类 -  .Net

1

反编译C#的dll/exe文件并修改,再重新生成dll/exe
摘要:以dll为例:1、把dll文件导入到ildasm工具中,ildasm是由微软提供的.net程序反编译工具,位于“C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin”2、在ildasm中File->dump,把dll文件转储为*.il文件存到某个指定文件... 阅读全文

posted @ 2015-10-12 12:48 IOTer 阅读(3325) 评论(0) 推荐(0)

C#开源资源大汇总(转)
摘要:一、AOP框架 Encase 是C#编写开发的为.NET平台提供的AOP框架。Encase 独特的提供了把方面(aspects)部署到运行时代码,而其它AOP框架依赖配置文件的方式。这种部署方面(aspects)的方法帮助缺少经验的开发人员提高开发效率。 NKalore是一款编程语言,它扩展了C#允... 阅读全文

posted @ 2014-07-20 22:36 IOTer 阅读(178) 评论(0) 推荐(0)

微软bug解决方法:System.ObjectDisposedException: 无法访问已释放的对象。对象名:“Icon”
摘要:在WINFORM开发中,对当打开多个MDI窗体,并且在最大化状态下关闭窗体时,常常出现以下异常:System.ObjectDisposedException: 无法访问已释放的对象。对象名:“Icon”。 在 System.Drawing.Icon.get_Handle() 在 System... 阅读全文

posted @ 2014-07-18 16:09 IOTer 阅读(10096) 评论(0) 推荐(0)

检测到在集成的托管管道模式下不适用的ASP.NET设置的解决方法
摘要:我们将ASP.NET程序从IIS6移植到IIS7,可能运行提示以下错误:HTTP 错误 500.23 - Internal Server Error检测到在集成的托管管道模式下不适用的 ASP.NET 设置。为什么会出现以上错误?在IIS7的应用程序池有两种模式,一种是“集成模式”,一种是“经典模式... 阅读全文

posted @ 2014-05-24 12:07 IOTer 阅读(143) 评论(0) 推荐(0)

c#快捷键(成为高手必备)
摘要:CTRL + SHIFT + B生成解决方案CTRL + F7 生成编译CTRL + O 打开文件CTRL + SHIFT + O打开项目CTRL + SHIFT + C显示类视图窗口F4 显示属性窗口SHIFT + F4显示项目属性窗口CTRL + SHIFT + E显示资源视图F12 转到定义C... 阅读全文

posted @ 2014-05-16 23:53 IOTer 阅读(16874) 评论(0) 推荐(0)

不使用第三个变量交换两个变量的值
摘要:假如有:int x = 1, y = 2;方法零:y = 2;x = 1;此方法纯属搞笑。请跳过阅读。方法一:x = x ^ y;y = x ^ y;x = x ^ y;此方法网上最常见,用二进制来看很容易理解。方法二:x = x + y;y = x - y;x = x - y;主要想说说此方法,因... 阅读全文

posted @ 2014-05-16 23:52 IOTer 阅读(174) 评论(0) 推荐(0)

WPFToolkit DataGrid 使用介绍
摘要:下载地址:http://wpf.codeplex.com/releases/view/40535下载安装文件,安装以后,在目录:C:\Program Files\WPF Toolkit\v3.5.50211.1下面有需要的dll接下来开始使用介绍:主要给DataGrid添加了4种类型的列:DataG... 阅读全文

posted @ 2014-05-16 23:50 IOTer 阅读(525) 评论(0) 推荐(0)

C#程序开发中经常遇到的10条实用的代码
摘要:1 读取操作系统和CLR的版本OperatingSystem os = System.Environment.OSVersion;Console.WriteLine(“Platform: {0}”, os.Platform);Console.WriteLine(“Service Pack: {0}”... 阅读全文

posted @ 2014-05-16 23:48 IOTer 阅读(138) 评论(0) 推荐(0)

C# 禁止应用程序启动两次
摘要:static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() ... 阅读全文

posted @ 2014-05-16 23:39 IOTer 阅读(640) 评论(0) 推荐(0)

C#检测U盘拔插
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Window... 阅读全文

posted @ 2014-05-16 23:37 IOTer 阅读(688) 评论(0) 推荐(0)

如何在C#中利用蜂鸣编写歌曲
摘要:用Console.Beep(频率, 延时毫秒);方法发声每个八度之间频率翻一倍using System;namespace ConsoleTest{ class Test{ static public void Main(String []args){ ... 阅读全文

posted @ 2014-05-16 23:36 IOTer 阅读(532) 评论(1) 推荐(1)

C#弹出U盘
摘要:using System;using System.Collections.Generic;using System.Text;using System.Runtime.InteropServices;using System.Threading;namespace Ulog{ /// ... 阅读全文

posted @ 2014-05-16 23:35 IOTer 阅读(1978) 评论(0) 推荐(0)

[WPF疑难]禁用窗口上的关闭按钮
摘要:namespace VersatileMessageBoxLib{ using System; using System.Windows.Interop; using System.Runtime.InteropServices; public class CloseButt... 阅读全文

posted @ 2014-05-16 23:34 IOTer 阅读(755) 评论(0) 推荐(0)

C#设置开机启动程序
摘要:private void AutoRun() { string starupPath = Application.ExecutablePath; RegistryKey loca = Registry.LocalMachine; Reg... 阅读全文

posted @ 2014-05-16 21:21 IOTer 阅读(65) 评论(0) 推荐(0)

不要在using语句中调用WCF服务
摘要:如果你调用WCF服务时,像下面的代码这样在using语句中进行调用,需要注意一个问题。using (CnblogsWcfClient client = new CnblogsWcfClient()){ client.Say("Hello, cnblogs.com!");}上面这段代码看上去没问... 阅读全文

posted @ 2014-05-16 21:20 IOTer 阅读(107) 评论(0) 推荐(0)

用正则表达式验证经纬度字符串
摘要:// 经度 string patternLongitude = "^[EW]?((//d|[1-9]//d|1[0-7]//d)[//s//-,;°度](//d|[0-5]//d)[//s//-,;′分](//d|[0-5]//d)(//.//d{1,2})?[//s//-,;/"秒]?$)|(18... 阅读全文

posted @ 2014-05-16 21:17 IOTer 阅读(1010) 评论(0) 推荐(0)

GPRS 心跳包的由来
摘要:心跳功能的意思是指DTU每隔一定时间,发一个数据包到数据中心。主要功能:1.防止掉线,因为运营商为了防止一些终端挂在网上,而不传数据(因为GPRS或CDMA都是按流量收费的),所以当发现终端一定时间内没有传输数据时(约2分钟),就会把终端踢下线。2.实现远程在线监测,数据中心可实现监测各终端是否在线... 阅读全文

posted @ 2014-05-16 21:15 IOTer 阅读(747) 评论(0) 推荐(0)

C# 导入.reg文件
摘要:/// /// 执行注册表导入 /// /// 注册表文件路径public void ExecuteReg(string regPath){if (File.Exists(regPath)){regPath = @"""" + regPath + @"""";Process.Start("reged... 阅读全文

posted @ 2014-05-16 21:14 IOTer 阅读(1068) 评论(0) 推荐(0)

VB.NET常用方法和函数集
摘要:[quote]Abs(number) 取得数值的绝对值。Asc(String) 取得字符串表达式的第一个字符ASCII 码。Atn(number) 取得一个角度的反正切值。CallByName (object, procname, usecalltype,[args()]) 执行一个对象的方法、设定... 阅读全文

posted @ 2014-05-10 01:00 IOTer 阅读(845) 评论(0) 推荐(0)

C#使用浏览器(Internet Explorer)默认的代理服务器设置
摘要:大家在使用 QQ, MSN,BaiduHi 等IM软件的时候, 在网络设置里,通常都会有一项是代理设置,其中的一个选项就是 “使用浏览器设置”,那么在我们 在WinForm程序里,如何使用此项功能呢其实是非常EASY的!WebClientwc =newWebClient();wc.Proxy =We... 阅读全文

posted @ 2014-05-10 00:42 IOTer 阅读(545) 评论(0) 推荐(0)

1

导航