09 2020 档案
摘要:File类提供用于创建、复制、删除、移动和打开单一文件的静态方法,并协助创建 FileStream 对象。 FileInfo:文件操作(创建,读写性) DirctoryInfo:文件夹操作 File:文件读写 使用流读取文件适合用于读写比较大的文件 FileStream:适合读取二进制文件 Stre
阅读全文
摘要:1.首先创建server端 class Program { static void Main(string[] args) { Console.WriteLine("Server is Running..."); //1.TcpListener对socket进行了一次封装,这个类会自己创建socke
阅读全文
摘要:class Program { static void Main(string[] args) { //string connStr = "server=.;database=TestBase;uid=lyc;pwd=123456;Max Pool Size=5;"; //for (int i =
阅读全文
摘要:class Program { static void Main(string[] args) { SqlConnection conn = new SqlConnection(); //1.手写 //string connStr = "server=.;database=db1;uid=sa;pw
阅读全文
摘要:1 猫类Cat class Cat{ public string name; public string color; public Cat(string name, string color){ this.name = name; this.color = color; } public void
阅读全文
摘要:1.cat类 class Program { static int Test1() { return 1; } static int Test2(string s) { //Console.WriteLine(s); return 100; } static void Main(string[] a
阅读全文
摘要:1 class Program { private delegate string GetAStr(); static void Main(string[] args) { //int x = 40; //string s = x.ToString(); //Console.WriteLine(s)
阅读全文
摘要:SQL语言分类: 1)DQL 数据查询语言 Select 列 From 表名 where 条件 2)DML 数据操纵语言 Insert 插入 insert into 表名 (列,列,...) values (对应的值,对应的值) Update 更新 update 表名 set 列名=值, 列名=值
阅读全文
摘要:创建数据库 use master --选择要操作的数据库 go--批处理命令 --创建数据库 create database TestNewBase --数据库名称 on primary --主文件组 ( name='TestNewBase',--数据库主要数据文件的逻辑名 filename='D:
阅读全文
摘要:MySQL 一、 MySQL基础 1. MySQL数据库链接及目录 控制台连接数据库 MySQL 是一个需要账户名密码登录的数据库,登陆后使用,它提供了一个默认的 root 账号,使用安装时设置的密码即可登录 中文显示乱码chcp 65001(即使用utf-8字符编码) 登陆格式 1)mysql -
阅读全文
摘要:服务端: class Program { static void Main(string[] args) { //1. 创建socket Socket tcpServer = new Socket(AddressFamily.InterNetwork, SocketType.Stream, Prot
阅读全文
摘要:方式一:通过委托发起线程(BeginInvoke): Func<int, int> a = Test; IAsyncResult ar = a.BeginInvoke(20, OnCallBack, a);//倒数第二个参数是一个委托类型的参数,表示回调函数,当线程结束时会调用这个委托指向的方法;倒
阅读全文
浙公网安备 33010602011771号