using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace DefineGraph{ class Graph { private const int Number = 10; Read More
include typedef int (*Cal)(int a,int b);//定义一个函数指针,第一个int是指向函数的返回值的类型,后面括号里面的两个int是指指向函数的参数类型 int Add(int a ,int b) { int result=a+b; return result; } int Sub(int a ,int b) { int result=... Read More
主要涉及到性能的损失 装箱,是把stack里面的值类型,变成一个object的实例,放在heap中。然后在stack里面存储实例的地址。属于隐式类型转换,不丢失精度,但是会损耗性能。 拆箱,是把heap里的实例的数据,搬出来变成值类型,放在stack中,属于显式类型的转换 int x=100;//下 Read More