随笔分类 -  C#

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

c#反射机制学习和利用反射获取类型信息
摘要:反射(Reflection)是.NET中的重要机制,通过放射,可以在运行时获得.NET中每一个类型(包括类、结构、委托、接口和枚举等)的成员,包括方法、属性、事件,以及构造函数等。还可以获得每个成员的名称、限定符和参数等。有了反射,即可对每一个类型了如指掌。如果获得了构造函数的信息,即可直接创建对象... 阅读全文

posted @ 2015-10-30 16:26 HOT SUMMER 阅读(13963) 评论(0) 推荐(0)

C#反射技术的简单操作(读取和设置类的属性)
摘要:反射的作用想必大家都知道了吧,少量属性的自动化操作手动添加几下当然是没有问题的,但是属性数量较多的时候敲起这些繁锁的代码可以困了,再说对扩展和维护性造成很多的不遍,以下代码中如不能直接使用请添加using System.Text;的引用。要想对一个类型实例的属性或字段进行动态赋值或取值,首先得得到这... 阅读全文

posted @ 2015-10-30 13:49 HOT SUMMER 阅读(717) 评论(0) 推荐(0)

事件
摘要:public class MyEventArgs { private int _rate; public int Rate { get { return _rate; } } p... 阅读全文

posted @ 2015-10-27 10:41 HOT SUMMER 阅读(214) 评论(0) 推荐(0)

委托回调的异步技术
摘要:static void Main(string[] args) { //DateTime dt = DateTime.Now; //RemoteObject.MyObject app = new RemoteObject.MyObject... 阅读全文

posted @ 2015-10-27 10:12 HOT SUMMER 阅读(235) 评论(0) 推荐(0)

代理的简单使用 简单的异步
摘要:static void Main(string[] args) { //DateTime dt = DateTime.Now; //RemoteObject.MyObject app = new RemoteObject.MyObject(... 阅读全文

posted @ 2015-10-27 09:43 HOT SUMMER 阅读(188) 评论(0) 推荐(0)

utubu远程
摘要:http://www.linuxidc.com/Linux/2014-04/100491.htm首先安装xfce:sudo apt-get updatesudo apt-get install xfce4如果网速较慢,这会持续一段时间。然后安装xrdp组件和vnc服务器:sudo apt-get i... 阅读全文

posted @ 2015-09-01 10:01 HOT SUMMER 阅读(341) 评论(0) 推荐(0)

C# FTP操作类可用
摘要:public class FtpClient { #region 构造函数 /// /// 创建FTP工具 /// /// 默认不使用SSL,使用二进制传输方式,使用被动模式 /// //... 阅读全文

posted @ 2015-08-21 21:48 HOT SUMMER 阅读(3570) 评论(0) 推荐(0)

C# FTP操作类
摘要:using System;using System.Net;using System.IO;using System.Text;using System.Net.Sockets;using System.Collections.Generic;namespace 阿飞_秋风扫落叶网站软文系统.Com... 阅读全文

posted @ 2015-08-21 18:11 HOT SUMMER 阅读(962) 评论(0) 推荐(0)

缺少编译器要求的成员“System.Runtime.CompilerServices.ExtensionAttribute..ctor” 解决方案
摘要:namespace System.Runtime.CompilerServices { public class ExtensionAttribute : Attribute { } } 网上找的其他方法错误产生环境及非完美解决办法错误提示:缺少编译器要求的成员“System.Ru... 阅读全文

posted @ 2015-08-19 23:52 HOT SUMMER 阅读(1393) 评论(0) 推荐(0)

远程读取XML根级别上的数据无效。 行 1,位置 1
摘要:trim一下就可以了 阅读全文

posted @ 2015-08-19 13:14 HOT SUMMER 阅读(267) 评论(0) 推荐(0)

使用C#选择文件夹、打开文件夹、选择文件
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Window... 阅读全文

posted @ 2015-08-18 22:12 HOT SUMMER 阅读(425) 评论(0) 推荐(0)

C#写入和读出文本文件
摘要:1.添加命名空间 System.IO; System.Text;2.文件的读取 (1).使用FileStream类进行文件的读取,并将它转换成char数组,然后输出。 byte[] byData = new byte[100]; char[] charData = ... 阅读全文

posted @ 2015-08-08 13:37 HOT SUMMER 阅读(491) 评论(0) 推荐(0)

AppModify修改app.config
摘要:public class AppModify { /// /// 依据连接串名字connectionName返回数据连接字符串 /// /// /// public static string GetC... 阅读全文

posted @ 2015-08-06 11:26 HOT SUMMER 阅读(484) 评论(0) 推荐(0)

C# 文件与二进制互转数据库写入读出
摘要://这个方法是浏览文件对象 private void button1_Click(object sender, EventArgs e) { //用户打开文件浏览 using (OpenFileDialog dialog = ... 阅读全文

posted @ 2015-06-25 19:50 HOT SUMMER 阅读(387) 评论(0) 推荐(0)

简单的线程与界面通用方法,不是很好,但是很方便
摘要:base.BeginInvoke((MethodInvoker)delegate() { this.newdt.Rows[e.ProgressPercentage]["Stat"] = _link.Url; ... 阅读全文

posted @ 2015-06-19 22:43 HOT SUMMER 阅读(268) 评论(0) 推荐(0)

JsonHelper修改4.0
摘要:public class JsonHelper { /// /// 将对象序列化为JSON格式 /// /// 对象 /// json字符串 public static string Seriali... 阅读全文

posted @ 2015-06-02 21:14 HOT SUMMER 阅读(688) 评论(0) 推荐(0)

List<T>做数据源绑定的问题
摘要:List lc;// = new List(); private void BindGrid() { //if (lc.Count > 0) // lc.Clear(); lc = new List... 阅读全文

posted @ 2015-06-02 19:55 HOT SUMMER 阅读(630) 评论(0) 推荐(0)

VS2013智能提示
摘要:Ctrl+Alt+空格 阅读全文

posted @ 2015-05-31 21:33 HOT SUMMER 阅读(364) 评论(0) 推荐(0)

Newtonsoft.Json(Json.Net)学习笔记
摘要:Newtonsoft.Json,一款.NET中开源的Json序列化和反序列化类库(下载地址http://json.codeplex.com/)。下面是Json序列化和反序列化的简单封装:/// /// Json帮助类 /// public class JsonHelper ... 阅读全文

posted @ 2015-05-30 12:27 HOT SUMMER 阅读(254) 评论(0) 推荐(0)

SmartThreadPool
摘要:首先是实例化的时候的参数的解释//Initialize SmartThreadPool & Make logs//SmartThreadPool m_hThreadPool;//m_hThreadPool = new SmartThreadPool();//声明一个线程池STPStartInfo s... 阅读全文

posted @ 2015-05-24 22:07 HOT SUMMER 阅读(843) 评论(0) 推荐(0)

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

导航