- 博客(25)
- 资源 (14)
- 收藏
- 关注
原创 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 1768
原创 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
原创 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
原创 c# 匿名函数 实现
c# 匿名函数 buttonOK.Click += new EventHandler((object sender, EventArgs e)=> { MessageBox.Show("匿名函数","提示");});
2020-08-18 17:30:20 171
原创 c# 自动关闭对话框
在使用的时候,输入 Form f = new Form() { FormBorderStyle = FormBorderStyle.None, Height = 0, Widt...
2019-07-12 17:22:28 586
原创 端口转发源码
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 976
转载 mssql 触发器创建
触发器(trigger)是个特殊的存储过程,它的执行不是由程序调用,也不是手工启动,而是由事件来触发,当对一个表进行操作( insert,delete, update)时就会激活
2016-05-13 17:20:03 963
原创 C# html解析
c# html解析引用这个HtmlAgilityPack.dll using HtmlAgilityPack; private string getviewstate(string html) { string CategoryListXPath = "/html[1]/body[1]/div[1]/input[1]";
2016-05-12 17:17:00 614
原创 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
原创 c# 最简单的线程
(new Thread(() => { MessageBox.Show("处理完成"); Application.Current.Dispatcher.BeginInvoke(new Action(() => { (sender as Button).IsEnabled = tr
2016-04-01 15:20:40 360
转载 c# .net2 httphelper
/// /// 类说明:HttpHelper类,用来实现Http访问,Post或者Get方式的,直接访问,带Cookie的,带证书的等方式,可以设置代理/// 重要提示:请不要自行修改本类,如果因为你自己修改后将无法升级到新版本。如果确实有什么问题请到官方网站提建议,/// 我们一定会及时修改/// 编码日期:2011-09-20/// 编 码 人:苏飞/// 联系方式:3619836
2016-03-24 21:39:18 593
转载 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
原创 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
原创 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
转载 c# .net4 httphelper
/// /// 类说明:HttpHelper类,用来实现Http访问,Post或者Get方式的,直接访问,带Cookie的,带证书的等方式,可以设置代理/// 重要提示:请不要自行修改本类,如果因为你自己修改后将无法升级到新版本。如果确实有什么问题请到官方网站提建议,/// 我们一定会及时修改/// 编码日期:2011-09-20/// 编 码 人:苏飞/// 联系方式:3619836
2016-03-04 16:20:21 617
原创 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
原创 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# 最简单的委托
this.Invoke(new Action(() =>{ //这里面写需要进行的委托操作 //比如线程操作界面的语句等}));//举例this.Invoke(new Action(() =>{ this.TextBox1.Text = "12345";}));//举例this.Invoke(new Action
2016-03-03 21:35:17 327
C#进程间通信
2014-06-18
C#API大全 是Word文档
2014-06-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人