摘要:
Strings: immutable(不可变)的unicode字符序列。string s1 = "One Two Three Four";string sx = (string)s1.Clone(); //s1复制到sxConsole.WriteLine(Object.ReferenceEquals... 阅读全文
摘要:
Initializing Array Elements int[] myIntArray = new int[5] { 2, 4, 6, 8, 10 }; // longer syntax int[] myIntArray = { 2, 4, 6, 8, 10 }; ... 阅读全文
摘要:
An interface is a contract(协定) that guarantees to a client how a class or struct will behave.When a class implements an interface(实现一个接口), it tells an... 阅读全文
摘要:
与类密切相关的几个特征便是继承,多态和封装了,继承inheritanceThe specialization relationship is typically implemented using inheritance.Polymorphism(多态): There are two powerfu... 阅读全文
摘要:
类: 其中的成员变量和成员函数有public,private,protected,internal,protected internal五种Access-modifiers;public : the type or member can be accessed by any other code i... 阅读全文
摘要:
下面来介绍一下c#的基本数据类型他的变量类型转化和c++相同,值域大的变量=值域小的变量;隐式转化是可以的。比如 short x = 5;int y = x;但是值域小的变量=值域大的变量;就会编译错误。除非显式强制转化,但这样可能会丢失数据信息。枚举型代码using System;using Sy... 阅读全文
摘要:
本来是第一周的课程,可是由于这个软件太大了,我的流量不够用了,耽误了,只能延后一周交作业了,希望老师原谅。下面开始说说c#这门语言吧•C# FeaturesüAll in one(不需要描述Class的头文件或IDL), and XML inline documentation in Source.... 阅读全文