c#
qq_15572445
这个作者很懒,什么都没留下…
展开
-
c# 自定义消息提示框
c# winform 自定义消息提示框。带自动关闭,自定义按钮,多按钮增加,带复选框。MessageBoxExDemo原创 2020-08-24 10:16:33 · 1081 阅读 · 0 评论 -
c# 匿名函数 实现
c# 匿名函数 buttonOK.Click += new EventHandler((object sender, EventArgs e)=> { MessageBox.Show("匿名函数","提示");});原创 2020-08-18 17:30:20 · 171 阅读 · 0 评论 -
C# 反射替换原本的方法
C# 反射替换原本的方法,使用反射直接获取到两个methodinfo,然后调用下面代码。class class1 { public static BindingFlags BindingFlags = BindingFlags.Static | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public; public static T GetControl<T>.原创 2020-08-18 17:28:11 · 1773 阅读 · 0 评论 -
c# 读取excle表
原创 2016-03-27 15:14:39 · 283 阅读 · 0 评论 -
c# webbrowser 设置cookie
webbrowser 设置cookie原创 2016-05-12 17:08:43 · 1158 阅读 · 0 评论 -
c# 执行javascript
c# 执行javascript在引用添加.net ,找到这个using MSScriptControl; private string jseval(string str, string jsdaima) { ScriptControlClass js = new ScriptControlClass();原创 2016-05-12 17:12:35 · 312 阅读 · 0 评论 -
c# listbox 实现datatable 绑定
listbox 实现datatable 绑定原创 2016-07-23 16:14:06 · 4376 阅读 · 0 评论 -
sql parameter 显示已存在该key解决方案
显示已存在该key解决方案原创 2017-04-20 11:26:49 · 279 阅读 · 0 评论 -
端口转发源码
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.Net.Sockets;using System.Threading;namespace PortTresferClient{ class Program { ...原创 2018-03-07 13:51:06 · 977 阅读 · 0 评论 -
c# 自动关闭对话框
在使用的时候,输入 Form f = new Form() { FormBorderStyle = FormBorderStyle.None, Height = 0, Widt...原创 2019-07-12 17:22:28 · 586 阅读 · 0 评论 -
c# .net2 httphelper
/// /// 类说明:HttpHelper类,用来实现Http访问,Post或者Get方式的,直接访问,带Cookie的,带证书的等方式,可以设置代理/// 重要提示:请不要自行修改本类,如果因为你自己修改后将无法升级到新版本。如果确实有什么问题请到官方网站提建议,/// 我们一定会及时修改/// 编码日期:2011-09-20/// 编 码 人:苏飞/// 联系方式:3619836转载 2016-03-24 21:39:18 · 593 阅读 · 0 评论 -
c# socket 异步
http://download.csdn.net/detail/qq_15572445/9471828客户端:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq转载 2016-03-24 21:31:18 · 680 阅读 · 0 评论 -
c# 最简单的线程
(new Thread(() => { MessageBox.Show("处理完成"); Application.Current.Dispatcher.BeginInvoke(new Action(() => { (sender as Button).IsEnabled = tr原创 2016-04-01 15:20:40 · 360 阅读 · 0 评论 -
c# httpgethtml
c# httpgethtml原创 2016-03-04 10:26:31 · 452 阅读 · 0 评论 -
c# 简单日志记录 txt
enum logtype { ERROR, WARMING, INFO, SUCCESS } private void log(string log,logtype type) { string str = DateTime.No原创 2016-03-04 15:01:17 · 830 阅读 · 0 评论 -
c# json解析 .net4.0
//序列化json JObject ob = (JObject)JsonConvert.DeserializeObject(text); string data = (ob["tags"].ToString()); int typecount = ((JArray)ob["tags"]).Count; for (int i =0 ; i原创 2016-03-04 15:08:11 · 750 阅读 · 1 评论 -
c# mysql getstring getdatatable 需要MySql.Data.dll
using System;using System.Collections.Generic;using System.Linq;using System.Text;using MySql.Data.MySqlClient;using System.Data;namespace mysqlhelper{ class mysqlhelper { str原创 2016-03-04 16:16:01 · 797 阅读 · 0 评论 -
c# uploadimage - httphelper
c# httphelper upload image原创 2016-03-04 16:07:32 · 379 阅读 · 0 评论 -
c# .net4 httphelper
/// /// 类说明:HttpHelper类,用来实现Http访问,Post或者Get方式的,直接访问,带Cookie的,带证书的等方式,可以设置代理/// 重要提示:请不要自行修改本类,如果因为你自己修改后将无法升级到新版本。如果确实有什么问题请到官方网站提建议,/// 我们一定会及时修改/// 编码日期:2011-09-20/// 编 码 人:苏飞/// 联系方式:3619836转载 2016-03-04 16:20:21 · 617 阅读 · 0 评论 -
c# 照片轮播控件
新建一个usercontral添加图片前要先stopusing System;using System.Collections.Generic;using System.ComponentModel;using System.Drawing;using System.Data;using System.Linq;using System.Text;us原创 2016-03-04 16:43:07 · 2884 阅读 · 0 评论 -
c# getipv4
private void GetIPv4() { string hostName = Dns.GetHostName();//本机名 //System.Net.IPAddress[] addressList = Dns.GetHostByName(hostName).AddressList;//会警告GetHostByName(原创 2016-03-04 16:46:21 · 286 阅读 · 0 评论 -
c# setxmlvalue
private void setxmlvalue(string path,string key,string value ) { XElement xe = XElement.Load(path ); IEnumerable element = from ele in xe.Elements("param")原创 2016-03-04 16:48:22 · 330 阅读 · 0 评论 -
c# 最简单的委托
this.Invoke(new Action(() =>{ //这里面写需要进行的委托操作 //比如线程操作界面的语句等}));//举例this.Invoke(new Action(() =>{ this.TextBox1.Text = "12345";}));//举例this.Invoke(new Action原创 2016-03-03 21:35:17 · 327 阅读 · 0 评论