编译器如何在C#中工作

编译器如何在C#中工作

本文介绍了编译器如何在C#中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这些代码在编译器创建.exe的速度方面是否存在差异?



is there a differents between these codes on speed on how the compiler create the .exe ?

String s = Object1.Object2.GetCustomerName();// the Name can also be a Property
CallMethod(s);











and

CallMethod(Object1.Object2.GetcustomerName());





第二个如果在整个项目中完成,那么只需要更少的代码。如果会有更大的这样的东西,那么就很难阅读代码。



第一个在调试时非常有用,因为你可以看到非常快的价值你打电话给方法。代码会更清晰。



我说错了吗?



谢谢,



The second would just have less code if this is done in the whole project. If there would be bigger things like this it would just be hard to read the code.

The first would be very helpfull at debugging because you can see very fast the value you call the method. And the code would be much cleaner.

Am i saying something wrong?

Thanks,

推荐答案




这篇关于编译器如何在C#中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 03:39