摘要:
using System; namespace ConsoleTese { class Program { public delegate int dele(int a, int b); static void Main(string[] args) { ProductFactory product 阅读全文
摘要:
using System; namespace ConsoleTese { class Program { public delegate int dele(int a, int b); static void Main(string[] args) { ProductFactory product 阅读全文
摘要:
TryParse()方法可以把字符串转化为对应的数据类型,但是和Parse()不同的是,它执行过程中转化出错,并不会抛出异常,他的返回值是bool类型 class Program { static void Main(string[] args) { Student stu = new Studen 阅读全文
摘要:
值参数的意义在于传进来的参数是该参数的副本,在传进来之后进行的改变,不会影响到该该参数本身的值 class Program { static void Main(string[] args) { Student stu = new Student(); Acess ac = new Acess(); 阅读全文
摘要:
静态字段是属于类的,由类名直接调用,因为static在程序初始化的时候就已经在内存创建好了,直接调用就行 常量属于对象的,只有把类实例化出来,在用对象名才可以调用,因为在程序初始化的时候,如果常量没有被调用,那么就不会占用内存空间,只有在实例化对象的时候,才会在内存中开辟该内存的空间 class S 阅读全文