你会在哪里使用C#运行库编译? [英] Where would you use C# Runtime Compilation?

查看:187
本文介绍了你会在哪里使用C#运行库编译?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我偶然发现一个简短的讨论最近在其他网站上关于C#运行时编译近日,同时寻找别的东西,并认为这个想法很有趣。你用过吗?我试图确定/当一个人可以使用这一点,它解决什么问题。我会听取您如何使用它或它使什么情况下意义非常感兴趣。

I happened upon a brief discussion recently on another site about C# runtime compilation recently while searching for something else and thought the idea was interesting. Have you ever used this? I'm trying to determine how/when one might use this and what problem it solves. I'd be very interested in hearing how you've used it or in what context it makes sense.

谢谢了。

推荐答案

通常情况下,我看到在您目前正在使用的反思,需要优化性能情况下,这种使用。

Typically, I see this used in cases where you are currently using Reflection and need to optimize for performance.

例如,而不是使用反射来调用方法,X,你在运行时为你做这个生成动态方法。

For example, instead of using reflection to call method X, you generate a Dynamic Method at runtime to do this for you.

这篇关于你会在哪里使用C#运行库编译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆