11269人加入学习
(28人评价)
C#编程-第三季-坦克大战-宇宙最简单2021最新版

使用VS2019 制作完成于2021年11月12日

价格 免费

每添加一个控件都添加一个代码

具体

designer 

form1 放功能性dai'ma

[展开全文]

as :类的转换 

转换失败不会报错,会返回null

[展开全文]

创建线程:

方法一:

ThreadStart start = new ThreadStart(ChildThreadMethod);//线程执行方法;

Thread childThread = new Thread(start);

childThread.Start();

方法二:

Thread childThread = new Thread(new ThreadStart(ChildThreadMethod));

childThread.Start();

 

[展开全文]

线程暂停:

Thread.Sleep(1);

线程终止:

childThread.Abort();

[展开全文]

10:04C#Part语法,允许一个类在两个cs文件里分开声明【分类管理】

[展开全文]

lock()加锁,解决线程冲突,同时调用的问题

[展开全文]

Father声明的对象只能调用Father内的函数

Father f=new Father;

Son s=(Son)f;不能运行

Father f=new Son;

Son s=(Son)f;能运行

//f是按战斗机Son构造的,但我们当客机Father用,实际上还是有战斗机的功能,也能当客机,但按客机构造只能做客机

[展开全文]

Thread 线程

ThreadStart 线程执行体

ThreadStart start = new ThreadStart(线程要执行的方法)

Thread tr = new Thread(new ThreadStart(方法))

此时 tr.Start()之后 会新开启一个线程来执行参数中的方法了

多个线程同步执行 谁快谁慢不que

[展开全文]

 this.startpostion = formstartposition.manual

this.location = new point()

 

[展开全文]

 

designer里面放设计相关的代码, 窗体的设计,外观。

 

Form1.resx里面放业务相关的代码。

[展开全文]

Image image = Properties.Resources.Boss;

Bitmap bm = properties.Resources.EXP4

g.DrawImage(bm,150,150);

[展开全文]

console.readline();

 

 

 

 

 

 

 

 

[展开全文]

静态方法:可以通过类调用

普通方法:只能通过对象调用

[展开全文]

挺好的。最大的精髓在于前期几个静态类和基类的设计。

[展开全文]

授课教师

SiKi学院老师

课程特色

图文(1)
下载资料(1)
视频(35)