随笔分类 - c#
摘要:1.一个普通的加法如下 internal class Program { private static void Main(string[] args) { int s = sum(10, 20); Console.WriteLine("Sum is: " + s); } private stati
阅读全文
摘要:需要用的包: 把之前的tcp修改成控件 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System
阅读全文
摘要:先添加包 代码部分: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; us
阅读全文
摘要:前端xaml模块 <Window x:Class="Wpf_new.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/
阅读全文
摘要:给按钮添加点击事件 给 Button 添加属性 Click,在button后任意地方输入Click,在选择,创建Button_Click事件(将事件绑定到新创建的名为Button_Click) private void Button_Click(object sender, RoutedEventA
阅读全文
摘要:两种遍历方法:for和foreach遍历 点击查看代码 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using
阅读全文
摘要:例子展示: 设置一个动物类,dog类,cat类,使用虚方法改写 点击查看代码 using System; public class Animal { // 声明一个虚方法 public virtual void Speak() { Console.WriteLine("Animal speaks")
阅读全文
摘要:写一个例子 基类敌人类(hp speed 方法 :move ai )派生出来两个类 boos类 type1enemy类 using System.Collections.Generic; using System.Linq; using System.Text; using System.Threa
阅读全文

浙公网安备 33010602011771号