Solved

Usefullness of IL code modules in my C# programming.

Posted on 2004-07-30
2
155 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

914 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

19 Experts available now in Live!

Get 1:1 Help Now