随笔分类 - C#
摘要:本文我们收集了PHP,Java,.NET,Python,Ruby等几门语言的一些非常有用的特性技巧以及最佳的实践方法,希望对您有所帮助!如果你在创建高性能应用方面还有其他更好的链接,欢迎与我们分享。JAVAJava Performance TipsJava Performance on WikipediaIntel’s report on Java Performance tipsJava performance tuning (book).NET.net Performance TipsImproving .net performance (book)Improving .net and a
        阅读全文
            
摘要:如何让系统加载自己写的驱动程序?两种办法:1、在[HKEY_LOCAL_MACHINE/Drivers/BuiltIn]下添加注册键。2、在应用程序中调用ActivateDeviceEx。在一些文件中用分号来表示注释,例如下面的内容; @CESYSGEN IF SERVERS_MODULES_HTTPD; @CESYSGEN ENDIF在“CESYSGEN...”前加了“@”,有没有什么特别的含义?在WINCE的一些文件中,用“;”作为注释并在注释文字中用@CESYSGEN作为标记,后面接条件语句。Cefilter.exe工具负责按照条件来筛选文件内容,所以不要轻易地删除包含@CESYSGEN
        阅读全文
            
摘要://引用命名空间:using System.IO;using System.Reflection;//获得路径 string aurl = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase.ToString()) + "\\";//注意 后面的...+"\\" 可以不加,但是 如果 后面还有路径情况下 再用这个路径时 一定前面加"\\" 别忘记了 上次我就犯这个幼稚bug 哎//例如: aurl+"\\image\\img_1.j
        阅读全文
            
摘要:第一种方法 (建议用这个,我已经测试) 代码如下using System;using System.Collections.Generic;using System.Windows.Forms;//using RFIDWareHouse.View;using System.Runtime.InteropServices;namespace Phone{ static class Program { [DllImport("coredll.Dll")] private static extern int GetLastError(); [Dl...
        阅读全文
            
摘要:WinForm 下我们可以调用MessageBox.Show 来显示一个消息对话框,提示用户确认等操作。在有些应用中我们需要通过程序来自动关闭这个消息对话框而不是由用户点击确认按钮来关闭。然而.Net framework 没有为我们提供自动关闭MessageBox 的方法,要实现这个功能,我们需要使用Window API 来完成。 首先我们需要找到这个消息对话框的窗口句柄,一个比较简单的方法就是用 FindWindow API 来查找对应的窗体句柄。第一种方法:[DllImport("user32.dll",SetLastError=true)]staticexternIn
        阅读全文
            
摘要:using System;using System.Linq;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using OpenNETCF.Net;using OpenNETCF.Net.NetworkInformation;using System.Threading;namespace GetMAC{ public partial class For
        阅读全文
            
摘要:数据库的服务器管理员信息表学生信息表一、登陆窗口源代码:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Data.SqlClient; //此处的应用是必要的namespace 数据库{ public partial class Form1 : Form { public Form1()...
        阅读全文
            
                    
                
浙公网安备 33010602011771号