Solved

Usefullness of IL code modules in my C# programming.

Posted on 2004-07-30
2
157 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:Tom 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

679 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