public static void main()
{
int a=5;
Console.WriteLine("{0},{1},{2}",a,a,a); //第二种
int a=5;
Object o=a;
Console.WriteLine("{0},{1},{2}",o,o,o);
}
那种速度快?
解决方案 »
- 请确保此代码文件中定义的类与“inherits”属性匹配
- 超晕的问题,上传网站不能浏览!
- 这两种写法有什么区别,为什么第一种在点button4的时候button1和button2没有变为可用.而要再点一次.
- ------/////做Web的进销存,卡壳了。请前辈们指导指导,是思路问题,红星的请进,绿的也欢迎,谢谢!//////------------
- licenses.licx”转换为二进制资源。出错 高高手进
- 日历控件高手请进!
- 如何在线编辑word、excel文档?
- 关于字段计算转换显示的问题。
- 两个项目间的页面传递session,为何总传不过去。
- 看这个问题(if else)
- 如何使用JS写Cookie,用Cookie保存一个集合,具体代码 求高人指点
- 请教全局变量的问题。
这一步
.method private hidebysig static void Main(string[] args) cil managed
{
.entrypoint
// 代码大小 33 (0x21)
.maxstack 4
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldc.i4.5
IL_0002: stloc.0
IL_0003: ldstr "{0},{1},{2}"
IL_0008: ldloc.0
IL_0009: box [mscorlib]System.Int32
IL_000e: ldloc.0
IL_000f: box [mscorlib]System.Int32
IL_0014: ldloc.0
IL_0015: box [mscorlib]System.Int32
IL_001a: call void [mscorlib]System.Console::WriteLine(string,
object,
object,
object)
IL_001f: nop
IL_0020: ret
} // end of method Program::Main
第二种的 IL.method private hidebysig static void Main(string[] args) cil managed
{
.entrypoint
// 代码大小 25 (0x19)
.maxstack 4
.locals init (int32 V_0,
object V_1)
IL_0000: nop
IL_0001: ldc.i4.5
IL_0002: stloc.0
IL_0003: ldloc.0
IL_0004: box [mscorlib]System.Int32
IL_0009: stloc.1
IL_000a: ldstr "{0},{1},{2}"
IL_000f: ldloc.1
IL_0010: ldloc.1
IL_0011: ldloc.1
IL_0012: call void [mscorlib]System.Console::WriteLine(string,
object,
object,
object)
IL_0017: nop
IL_0018: ret
} // end of method Program::Main