![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#
hz2008
这个作者很懒,什么都没留下…
展开
-
Namespace 命名空间
Using system; 就像文件的全路径一样. 如果要使用的类和当前的类不在同一个namespace, 则须要添加using引用原创 2011-11-19 08:30:10 · 240 阅读 · 0 评论 -
C# Console Application
using System;namespace ConsoleApplication1{/// /// Class1 的摘要说明。/// class Class1{/// /// 应用程序的主入口点。/// [STAThread]static void Main(string[] args){//// TODO: 在此处添加代码以启原创 2011-11-19 08:21:45 · 721 阅读 · 0 评论 -
继承
using System;//using System.Collections.Generic;//using System.linq;using System.Text;namespace ConsoleApplication1{/// /// person 的摘要说明。/// public class Person{public string原创 2011-11-19 09:33:37 · 637 阅读 · 1 评论 -
异常
try{ int I = Convert.ToInt32(‘abc’)}catch (Exceptionex){ Console.WriteLine(“数据错误:” + ex.Message + “ “ +ex.StackTrace);}Console.ReadKey(); If (age { throw new Exception(“You c原创 2011-11-19 08:25:53 · 235 阅读 · 0 评论 -
常量,全局变量
常量: Public const int pi = 3;类型 int, double, float, 全局变量: Public static int TotalCount;原创 2011-11-19 08:33:22 · 319 阅读 · 0 评论