上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 79 下一页
摘要: Task类似后台线程。 先后任务:一个任务依赖于另一个任务。即有先后顺序。使用ContinueWith 后继任务,方法参数不可省略,类似线程池 一个任务A中启动一个新任务B,两个任务异步执行,可认为同时执行。 更深入内容参考: https://blog.csdn.net/qq3401247010/a 阅读全文
posted @ 2019-05-11 23:21 夕西行 阅读(495) 评论(0) 推荐(0)
摘要: Thread调用含参方法,参数必须是object类。ThreadPool调用的方法,无论是否含参,方法必须有object类参数(可不用,但得有) 【线程】 using System; using System.Threading; namespace ConsoleApplication3 { cl 阅读全文
posted @ 2019-05-11 23:02 夕西行 阅读(222) 评论(0) 推荐(0)
摘要: lock实现代码块只允许被一个线程访问 例如多个窗口售票,余票数的计算 using System; using System.Threading; namespace ConsoleApplication3 { class Program { int num = 10; void SellTicke 阅读全文
posted @ 2019-05-08 21:03 夕西行 阅读(232) 评论(0) 推荐(0)
摘要: progressBar的Step属性设置为1 using System; using System.Windows.Forms; using System.Threading; namespace Demo1 { public partial class Form1 : Form { public 阅读全文
posted @ 2019-05-08 20:42 夕西行 阅读(212) 评论(0) 推荐(0)
摘要: 1、移动pictureBox控件即可 素材: using System; using System.Drawing; using System.Windows.Forms; using System.Threading;//引入线程 namespace Demo { public partial c 阅读全文
posted @ 2019-05-08 19:19 夕西行 阅读(285) 评论(0) 推荐(0)
摘要: IO流操作文件内容,using System.IO;//引入命名空间 阅读全文
posted @ 2019-05-06 23:33 夕西行 阅读(236) 评论(0) 推荐(0)
摘要: 该类有三个方法: GetDirectories() 当前目录的子目录 GetFiles() 当前目录的文件列表 GetFileSystemInfos() 当前目录的文件、子目录,返回强类型FileSystemInfo数组 阅读全文
posted @ 2019-05-04 18:14 夕西行 阅读(365) 评论(0) 推荐(0)
摘要: File类、Directory类,都是静态类,可以直接使用类名 FileInfo类、DirectoryInfo类,都是动态类,需要new对象,通过对象来操作 【文件的创建、复制、移动、删除】using System.IO; 【文件基本信息】 Name,文件名 FullName,完整目录(包括文件名) 阅读全文
posted @ 2019-05-04 17:25 夕西行 阅读(388) 评论(0) 推荐(0)
摘要: 1、VS创建项目(实现数据库的增删改查、并在dataGridView中展示) 增、改通过Button,删通过快捷菜单ContextMenuStrip控件(DateGridView控件的ContextMenuStrip属性中要选择),查通过dataGridView单元格单击事件 2、SQL Serve 阅读全文
posted @ 2019-05-04 15:26 夕西行 阅读(1297) 评论(0) 推荐(0)
摘要: 接口,是一种协议规范,其中的属性、方法等成员只能定义,不能做其他操作。 接口中的成员,默认public,因此,成员无修饰符。 【格式】修饰符 interface 接口名称:接口列表{ 接口内容; } 通过类的继承来实现接口(成员的功能)。 接口成员的显示实现:如果接口列表的成员相同,那么在定义成员功 阅读全文
posted @ 2019-04-29 22:32 夕西行 阅读(164) 评论(0) 推荐(0)
上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 79 下一页