If optimizations are enabled will the JIT always inline this method?
问题 I am not expecting a definite yes or no. Any knowledge you might have I will consider as an answer. private String CalculateCharge(Nullable<Decimal> bill, Nullable<Decimal> rate) { return ((bill ?? 0.0m) * (rate ?? 0.0m)).ToString("C"); } 回答1: Inlining is an implementation detail of the JIT, not of the C# compiler. From Eric Gunnerson's blog: The JIT uses a number of heuristics to decide whether a method should be in-lined. The following is a list of the more significant of those (note that