摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System. 阅读全文
posted @ 2020-09-28 15:05 灰色淡季 阅读(265) 评论(0) 推荐(0)
摘要: Func <>委托 Func只有带泛型的一种形式,Action有带泛型和不带的两种 Func 委托必须要带有一个返回值 可以有0个或多达16个参数类型 最后一个泛型参数代表返回类型,前面的都是参数类型 参数类型必须跟指向的方法的参数类型按照顺序对应 线程中访问控件 dataGridView2.Inv 阅读全文
posted @ 2020-09-22 15:38 灰色淡季 阅读(133) 评论(0) 推荐(0)
摘要: Dictionary的描述 1、从一组键(Key)到一组值(Value)的映射,每一个添加项都是由一个值及其相关连的键组成 2、任何键都必须是唯一的 3、键不能为空引用null(VB中的Nothing),若值为引用类型,则可以为空值 4、Key和Value可以是任何类型(string,int,cus 阅读全文
posted @ 2020-09-22 13:37 灰色淡季 阅读(133) 评论(0) 推荐(0)
摘要: using System; using System.Windows.Forms; namespace 事件委托练习 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } //声明委托 publ 阅读全文
posted @ 2019-06-21 18:05 灰色淡季 阅读(165) 评论(0) 推荐(0)
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace 简单事件练习 8 { 9 10 class 事件发布者 11 { 12 ... 阅读全文
posted @ 2019-01-06 00:42 灰色淡季 阅读(198) 评论(0) 推荐(0)
摘要: 服务器端 using System; using System.Collections; using System.Net.Sockets; //命名空间 using System.Net; using System.Text; namespace SocketServer { //思路:1.创建一个Socket // 2.绑定一个ip和端口 ... 阅读全文
posted @ 2018-08-14 14:51 灰色淡季 阅读(207) 评论(0) 推荐(0)
摘要: 运行后的结果: For循环数字的值=1For循环数字的值=2For循环数字的值=3For循环数字的值=4For循环数字的值=5For循环数字的值=6For循环数字的值=7For循环数字的值=8For循环数字的值=9For循环数字的值=10ABCDES1的值S2的值数字的值=12i'm O1i am 阅读全文
posted @ 2018-08-14 14:09 灰色淡季 阅读(125) 评论(0) 推荐(0)
摘要: 1.CLASS中只有成员变量和成员方法 2.CLASS中的变量:全局变量 方法中的变量:局部变量 同class中的成员函数和成员变量可以进行运算。 3.使用别的CLASS需要NEW实例化,使用成员变量:新实力名.变量 使用成员函数:新实力名.方法() 同一类中MAIN函数调用其他方法时:本累要NEW 阅读全文
posted @ 2018-08-13 15:10 灰色淡季 阅读(106) 评论(0) 推荐(0)
摘要: using System; namespace CalculatorApplication { class NumberManipulator { public void getValues(out int x, out int y) { //Console.WriteLine("请输入第一个值: "); ... 阅读全文
posted @ 2018-08-09 15:54 灰色淡季 阅读(84) 评论(0) 推荐(0)