![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#
文章平均质量分 91
mnxinu
这个作者很懒,什么都没留下…
展开
-
C#读取键盘按键的程序
/**////用C#读取键盘按键的程?///key.cs的代码如下:using System ;using System.Drawing ;using System.Collections ;using System.ComponentModel ;using System.Windows.Forms ;using System.Data ;public class Form1 : Fo原创 2006-10-04 08:48:00 · 5503 阅读 · 0 评论 -
C#文本框只能输入数字和退格
/**////C#文本框只能输入数字和退?private void TextBox_KeyPress(object sender, KeyPressEventArgs e)...{ if(e.KeyChar!=8&&!Char.IsDigit(e.KeyChar)) ...{ e.Handled = true; }}/**////或?private void原创 2006-10-04 08:50:00 · 1109 阅读 · 0 评论 -
C#不分大小写的比较字符串
string.Compare(string1,string2);string1=string2 时 值为0;否则为非0原创 2006-10-04 08:57:00 · 909 阅读 · 0 评论 -
C#常用函数
记得看Stanley的C# primer的时候,这个大牛说学C#就是记住.net里面三千多个函数怎么用就可以了:)果然是大牛,说的话都这么牛. 1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int原创 2006-10-04 09:01:00 · 592 阅读 · 0 评论 -
C#自写函数-截取字符串某一长度并返回
/**////功能:截取字符串某一长度并返回///要截取的字符串///要截取的字符串长度///截取长度小于总长度时是否要加省略号/// 截取后的字符串///public static string LeftStr(string p_StrValue,int p_StrLen,bool p_HavePoints)...{ string m_NewStr = ""; int m_原创 2006-10-04 09:04:00 · 839 阅读 · 0 评论 -
ManagementObject 参数 WMI 一些参数(Win32_NetworkAdapterConfiguration)
class Win32_NetworkAdapterConfiguration : CIM_Setting{ boolean ArpAlwaysSourceRoute; boolean ArpUseEtherSNAP; string Caption; string DatabasePath; boolean DeadGWDetectEnabled; string DefaultIPGa原创 2006-10-12 09:52:00 · 1149 阅读 · 0 评论