0

Possible Duplicate:
Inline functions in C#?

Could someone guide me on how to request the .Net compiler to make functions inline? Thanks

Community
  • 1
  • 1
Muhammad Maqsoodur Rehman
  • 33,681
  • 34
  • 84
  • 124
  • read this http://stackoverflow.com/questions/473782/inline-functions-in-c –  Dec 07 '12 at 14:18
  • You cannot force it on .NET 3.5, the jitter optimizer makes the decision. You can only *prevent* a method from getting inlined. – Hans Passant Dec 07 '12 at 14:34
  • @HansPassant How can we prevent a method from getting inlined? And why we would need to do that? – Muhammad Maqsoodur Rehman Dec 07 '12 at 14:38
  • 2
    Use the [MethodImpl] attribute. You'd typically only do that to get better exception stack traces that show the method name. It won't show up if the method gets inlined. – Hans Passant Dec 07 '12 at 14:44

0 Answers0