C# compiler expand our code?

This is a discussion on C# compiler expand our code? within the C# Programming forums, part of the General Programming Boards category; Hello everyone, How could we see the C# compiler expand our code (I mean at source code level, not using ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    C# compiler expand our code?

    Hello everyone,


    How could we see the C# compiler expand our code (I mean at source code level, not using ILDasm to see at IL level or using Diassembly at native assembly code level)?

    For example, this is how foreach is expanded in C#.

    http://www.csharpfriends.com/Spec/in...cID=15.8.4.htm


    thanks in advance,
    George

  2. #2
    Registered User
    Join Date
    Jun 2003
    Posts
    129
    Why would you want to do this? The point of a language such as C# is to make it easier to read.
    He who asks is a fool for five minutes, but he who does not ask remains a fool forever.

    The fool wonders, the wise man asks. - Benjamin Disraeli

    There are no foolish questions and no man becomes a fool until he has stopped asking questions. Charles Steinmetz

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks DanFraser,


    Understanding how internal works will make us write better code, like when we know how compiler works, we will write better code. :-)

    Any ideas to my original question?

    Quote Originally Posted by DanFraser View Post
    Why would you want to do this? The point of a language such as C# is to make it easier to read.

    have a good weekend,
    George

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Advice requested, Code makes sense to me, not compiler
    By andrew.bolster in forum C Programming
    Replies: 53
    Last Post: 01-06-2008, 01:44 PM
  2. Compiler or code error?
    By Hunter2 in forum Windows Programming
    Replies: 2
    Last Post: 08-03-2003, 06:59 PM
  3. << !! Posting Code? Read this First !! >>
    By kermi3 in forum Windows Programming
    Replies: 0
    Last Post: 10-14-2002, 02:29 PM
  4. << !! Posting Code? Read this First !! >>
    By biosx in forum C++ Programming
    Replies: 1
    Last Post: 03-20-2002, 12:51 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21