C#学习之路
学习C#的开始,记录学习中的小知识,希望与大家分享
abel.xiang
从事测试,想通过编程来提高自己。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
ListBox控件—列表控件--常用的属性和方法
ListBox控件—列表控件 --常用的属性和方法 Items: public ObjectCollection Items {get; } 摘要: 该属性使用户可以获取当前存储在ListBox中的项列表的引用,可以在集合中添加项、移除项、获取项计数 返回结果: System.Windows.Forms.ListBox.ObjectCollection,表示 System.Windows.Forms.ListBox中的项 实例: listBox1.Items.Add("12月");原创 2021-04-08 15:18:11 · 4972 阅读 · 0 评论 -
C#之路:枚举
枚举是用户定义的整数类型,在声明枚举时,要指定该枚举的实例可以包含的一组可以接受的值。 语法: enum <enum_name> { enumeration list }; enumeration list:用逗号分隔开的标识符列表 namespace study1230 { class Program { public enum Week...原创 2019-12-31 11:50:08 · 155 阅读 · 0 评论 -
C#之路:程序流控制
条件语句 1.if语句 语法: if(Condition) Statements; else Statements; 2.switch语句 语法: switch(integerA) { case1: break; case2: break; case3: ...原创 2019-12-31 11:48:37 · 221 阅读 · 0 评论 -
C#之路:数据类型
值类型与引用类型 值类型:直接存储其值,存储在堆栈中(stack) 引用类型:存储对值得引用,存储在托管堆上 namespace study1230 { class Program { public class Vector { public int value; } static void M...原创 2019-12-31 11:46:13 · 223 阅读 · 0 评论 -
C#之路:变量
C#之路:变量 语法: datatype identifier; 编译器实际是不允许直接使用声明的变量,需要对其进行初始化。 若需要在一条语句中同时声明几个相同类型的变量,需要使用逗号隔开每个变量;同一条语句只能声明同类型的变量。 int i = 10, y = 20;`` int i = 10; bool y = true; 变量的作用域: 1.只要类在某个作用域内,其字段(成员变量)也在该作...原创 2019-12-30 11:51:39 · 739 阅读 · 0 评论 -
C#之路:Hello World
编程工具:Visual Studio 2015 简单的第一个程序: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using static System.Console; namespace _1_hello_w...原创 2019-11-21 10:24:59 · 177 阅读 · 1 评论
分享