Solved

Usefullness of IL code modules in my C# programming.

Posted on 2004-07-30
2
154 Views
Last Modified: 2010-04-15
I'm reading a book on C# and it says while writing code in pure IL is possible (although not as productive) you can use IL to do things that you cannot do in C#...for example...you can create global functions and call them from within IL.

Can someone tell me more about this.  What are the othe practical uses of IL code, beside the example I just gave from the book?
0
Comment
Question by:knowlton
  • 2
2 Comments
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 11680592
well you can put static members on interfaces as an example ... there are a few things that you cant do in C# but not that many are really "important". VB.NEt can also create these global functions (the module declaration create a function and a static class).
0
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 500 total points
ID: 11681017
as TAD pointed out in another question another good use is reflecting dynamic classes to avoid branching conditions ....

his example I believe was

for(i=0;i<100000;i++) {
    val += i;
}

vs

i+= 1;
1+=2;
...
i+= 99999;
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now