上一页 1 ··· 7 8 9 10 11 12 下一页
摘要: 在c#中同样的方法名称不一样的参数数量和类型可以实现方法重载class ResultDisplayer{void DisplayResult(string result){// implementation}void DisplayResult(int result){// implementati... 阅读全文
posted @ 2015-12-29 17:20 beautifulday 阅读(237) 评论(0) 推荐(0)
摘要: 实现下面效果的propertygrid属性下拉选择具体代码如下//form窗口类 public partial class Form1 : Form { public Form1() { InitializeComponent(); properties ps = new properties();... 阅读全文
posted @ 2015-12-29 15:36 beautifulday 阅读(7581) 评论(0) 推荐(2)
摘要: 枚举类型是用户自定义的整形,其定义形式如下public enum TimeOfDay{Morning = 0,Afternoon = 1,Evening = 2}枚举类型在实例化的时候其实是作为struct类型的获取该枚举类型string表示方式TimeOfDay time = TimeOfDay.... 阅读全文
posted @ 2015-12-25 17:37 beautifulday 阅读(221) 评论(0) 推荐(0)
摘要: byte[] receivedBytes = new byte[1024000];IPHostEntry ipHost = Dns.Resolve(ipaddress); //ipaddress可以是string类型的ip地址,为服务器端的ip地址IPAddress ipAddress = ipHo... 阅读全文
posted @ 2015-12-21 11:12 beautifulday 阅读(160) 评论(0) 推荐(0)
摘要: 提供了对数据访问的一种抽象层,是更加易于以编程的方式来操作及管理数据有以下几种模式:Model First, Database First, and Code First现在主要讨论code First这种模式Conceptual Schema Defi nition Language (CSDL)... 阅读全文
posted @ 2015-12-20 16:31 beautifulday 阅读(144) 评论(0) 推荐(0)
摘要: 先看下面实实例代码 private delegate void testdg(); private void button1_Click(object sender, EventArgs e) { testdg dg = new testdg(DgGo); dg.Invoke(); } priva... 阅读全文
posted @ 2015-11-16 10:41 beautifulday 阅读(2973) 评论(1) 推荐(0)
摘要: 类和结构体都包括数据和操作数据的方法类的定义形式class PhoneCustomer{public const string DayOfSendingBill = "Monday";public int CustomerID;public string FirstName;public strin... 阅读全文
posted @ 2015-11-14 11:11 beautifulday 阅读(211) 评论(0) 推荐(0)
摘要: 可已通过下面方法来启动一个新线程并执行相应的方法 new Thread(new ThreadStart(new Action(() => { //to do 启动新线程要执行的代码 }))).Start();其中的new action()是调用系统的一个代理库,实例化了一个代理实例。是不是很方便。还... 阅读全文
posted @ 2015-11-14 10:29 beautifulday 阅读(961) 评论(0) 推荐(0)
摘要: C#向listview中添加项如果要显示图片切换listview要显示的视图后端代码像这样添加运行结果如下如果想要显示大图标在listview largeimageList属性关联largeImageList1然后更改listview属性显示效果如下 阅读全文
posted @ 2015-11-09 13:54 beautifulday 阅读(282) 评论(0) 推荐(0)
摘要: 改变匹配括号的颜色实现如下效果1,首先工具选项2、依次执行下列操作选择括号匹配(方括号) 背景项 然后自定义颜色 就欧了。。。 阅读全文
posted @ 2015-11-04 14:09 beautifulday 阅读(1016) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 下一页