随笔分类 - c#程序设计
摘要:例题: proj4-1 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace proj4_1 { cl
阅读全文
摘要:例题: proj3-1 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace proj3_1 { cl
阅读全文
摘要:C#流程控制语句中最常用的三个是 选择语句(即条件语句)、循环语句和异常处理语句。 类别 关键字 选择语句 if、else、switch、case 循环语句 do、for、foreach、in、while 跳转语句 break、continue、default、goto、return 异常处理语句
阅读全文
摘要:例题: 1-1 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace proj1_1 { class
阅读全文
摘要:应该可以解释为占位符吧,比如这句Console.WriteLine("hello {0}",yourname);,其实在输出的时候就是将yourname变量的值放在{0}处,输入类似于 "hello xiaoming",这个可以写多个的,比如Console.WriteLine("hello {0},
阅读全文
摘要:例题: 设计一个控制台应用程序说明类型转换的应用: using System; namespace proj2_1 { class Program { static void Main(string[] args) { int i = 65, i1, i2; double d = 66.3456,
阅读全文
摘要:面向对象编程(Object Oriented Programming,OOP)。 面向对象的三大特性 特性 优势 封装 保证对象自身数据的完整性、安全性 继承 建立类之间的关系,实现代码复用,方便系统的扩展 多态 相同的方法调用可实现不同的实现方式 一、封装 封装是面向对象的重要内容,是面向对象的三
阅读全文
摘要:C# Console类学习笔记 Console.Write 表示向控制台直接写入字符串,不进行换行,可继续接着前面的字符写入。Console.WriteLine 表示向控制台写入字符串后换行。Console.Read 表示从控制台读取字符串,不换行。Console.ReadLine 表示从控制台读取
阅读全文

浙公网安备 33010602011771号