随笔分类 -  c#

上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
摘要:int num = 12345; string num1 = Convert.ToString(12345, 16); byte[] bytes = BitConverter.GetBytes(num);//将int32转换为字节数组 num = BitConverter.ToInt32(bytes,... 阅读全文
posted @ 2018-11-23 11:27 enych 阅读(3169) 评论(0) 推荐(0)
摘要:WebKit.WebKitBrowser kitBrowser = new WebKit.WebKitBrowser(); kitBrowser.Dock = DockStyle.Fill; // kitBrowser.Navigate("http://www.baidu.com"); kitBrow... 阅读全文
posted @ 2018-11-23 08:34 enych 阅读(2317) 评论(0) 推荐(0)
摘要:List list1=new List(); List list2=new List(); //Tuple, List> tuple = new Tuple, List>(); //报错,不能这样初始化. Tuple, List> pfInfo = Tuple.Create(list1, list2)... 阅读全文
posted @ 2018-11-22 11:02 enych 阅读(2304) 评论(0) 推荐(0)
摘要:public bool IfTime(string StartTime, string EndTime) { DateTime dt1 = Convert.ToDateTime(StartTime); DateTime dt2 = Convert.ToDateTime(EndTime); if (D 阅读全文
posted @ 2018-11-20 17:44 enych 阅读(4187) 评论(0) 推荐(0)
摘要://最大化 this.WindowState = FormWindowState.Maximized; //去掉标题栏 this.FormBorderStyle = FormBorderStyle.None; //设置picbox this.pictu... 阅读全文
posted @ 2018-11-20 10:16 enych 阅读(186) 评论(0) 推荐(0)
摘要:namespace invoke和begininvoke的用法 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } //声明接受int的方法并返回空的委托。 public delegate v 阅读全文
posted @ 2018-11-19 17:30 enych 阅读(2518) 评论(0) 推荐(0)
摘要:int startmaxid = 0; if (db.LPicture.Any()) { // LPicture Newmode = db.LPicture.Where(n => ).FirstOrDefault(); startmaxid = db.LPicture... 阅读全文
posted @ 2018-11-19 09:37 enych 阅读(2127) 评论(0) 推荐(0)
摘要:$("#txttype").val("Down");document.getElementById('form1').action = "/Backstage/xxx/List";document.getElementById("form1").submit();$("#txttype").val( 阅读全文
posted @ 2018-11-13 16:58 enych 阅读(2233) 评论(0) 推荐(0)
摘要:var str1 = Properties.Resources.ResourceManager.GetObject("String1", null); string url = System.Configuration.ConfigurationManager.AppSettings["url"]; //获得配置文件下的值 阅读全文
posted @ 2018-11-07 11:35 enych 阅读(3172) 评论(0) 推荐(0)
摘要:C# 打开另一个窗体,(模态对话框) Form1 frm= new Form1(); //创建对象 DialogResult retServer = frm.ShowDialog(); //模式对话框 if (retServer == DialogResult.OK) { InitConnectString(); } else { return; } 另一个窗体的保存按钮代码 this.Dial... 阅读全文
posted @ 2018-11-07 11:27 enych 阅读(2022) 评论(0) 推荐(0)
摘要:string str1 = "123AAA456AAAA789AAAAAAA1011"; string str2 = "123456789AAA23456789AAAA3456789AAAAAAA4567890"; string str3 = "123456788AAA23456789AAAA3456789AAAAAAA4567890"; ... 阅读全文
posted @ 2018-11-07 11:05 enych 阅读(5587) 评论(0) 推荐(0)
摘要:public interface ILogger {} public interface ILoggerWrapper { ILogger Logger {get;} } public interface ILog : IloggerWrapper //继承IloggerWrapper 这个接口 { bool IsErrorEnabled {get;} vo... 阅读全文
posted @ 2018-10-23 09:38 enych 阅读(215) 评论(0) 推荐(0)
摘要:while (' ' == json[pos]) { pos++; } 阅读全文
posted @ 2018-10-16 21:49 enych 阅读(250) 评论(0) 推荐(0)
摘要:private void button2_Click(object sender, EventArgs e) { var str = "1 2 3 4 5 6 7 8 9 10 11 12 13 "; //char[] chars = str.Replace(" ","").ToArray(); ... 阅读全文
posted @ 2018-09-23 17:47 enych 阅读(164) 评论(0) 推荐(0)
摘要:public string ConverNo(string str) { string result = ""; char[] chars = new char[7]; for (int i = 0; i < chars.Length; i++) chars[i] = '0'; ... 阅读全文
posted @ 2018-09-19 14:21 enych 阅读(547) 评论(0) 推荐(0)
摘要:一脸懵逼....... 0A 0B 0C 06 什么鬼 1个字节8位 最大10进制数 127 最小值是-128 0000 0000 1111 1111 = 255 (在0000 0000 1111 1111中是255)在(1111 1111中是-1) 1111 1110 = 254 0111 111 阅读全文
posted @ 2018-09-06 14:30 enych 阅读(9883) 评论(0) 推荐(0)
摘要:try { MemoryStream vMemoryStream = iData.GetData("Html Format") as MemoryStream; if (vMemoryStream!=null) { ... 阅读全文
posted @ 2018-08-25 11:19 enych 阅读(898) 评论(0) 推荐(0)
摘要:if(System.IO.File.Exists(@"")) { } if (System.IO.File.Exists(HttpRuntime.AppDomainAppPath + model.FilePath)) //判断文件是否存在 { try ... 阅读全文
posted @ 2018-08-07 09:35 enych 阅读(18925) 评论(0) 推荐(2)
摘要:#region --根据空格数截取 string temp = ""; int k = 0; int jc = 0; //循环截取 int[] rules1 = { 7, 6 }; while (!sr.EndOfStrea... 阅读全文
posted @ 2018-08-03 09:42 enych 阅读(881) 评论(0) 推荐(0)
摘要:string str = "4231"; int js = 1; var ss = ""; for (int i=0;i<str.Length;i++) { var s0 = str[i].ToString(); var s1 = (js... 阅读全文
posted @ 2018-07-30 16:11 enych 阅读(583) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页