Click here to Skip to main content
15,888,984 members
Home / Discussions / C#
   

C#

 
AnswerRe: application which allow multiple user to work on same file Pin
Dan Mos2-Feb-10 23:24
Dan Mos2-Feb-10 23:24 
AnswerRe: application which allow multiple user to work on same file Pin
sanforjackass2-Feb-10 23:40
sanforjackass2-Feb-10 23:40 
QuestionInsert New Item to Combobox after Data Binding Pin
pavanig92-Feb-10 22:53
pavanig92-Feb-10 22:53 
AnswerRe: Insert New Item to Combobox after Data Binding Pin
Dan Mos2-Feb-10 23:09
Dan Mos2-Feb-10 23:09 
GeneralI want to write a simple C# compiler Pin
Fired.Fish.Gmail2-Feb-10 21:52
Fired.Fish.Gmail2-Feb-10 21:52 
AnswerRe: I want to write a simple C# compiler Pin
Nuri Ismail2-Feb-10 22:07
Nuri Ismail2-Feb-10 22:07 
GeneralRe: I want to write a simple C# compiler Pin
Fired.Fish.Gmail3-Feb-10 0:50
Fired.Fish.Gmail3-Feb-10 0:50 
GeneralRe: I want to write a simple C# compiler Pin
harold aptroot3-Feb-10 1:43
harold aptroot3-Feb-10 1:43 
How simple? What are you going to leave out? (unsafe code? arrays? return values? method arguments? nonstatic methods? local variables?)
It's actually not all that hard (compared to native languages), it's just a stack architecture so you don't need to worry about register allocation and the peculiarities of x86, and since the JIT compiler does a lot of optimizations anyway you can just skip all that (no SSA stage needed to get a reasonable output)

Hello World is just this (debug output, as MSIL in text):

.class private auto ansi beforefieldinit Program
    extends [mscorlib]System.Object
{
    .method public hidebysig specialname rtspecialname instance void .ctor() cil managed
    {
        .maxstack 8
        L_0000: ldarg.0 
        L_0001: call instance void [mscorlib]System.Object::.ctor()
        L_0006: ret 
    }

    .method private hidebysig static void Main(string[] args) cil managed
    {
        .entrypoint
        .maxstack 8
        L_0000: nop 
        L_0001: ldstr "Hello World!"
        L_0006: call void [mscorlib]System.Console::WriteLine(string)
        L_000b: nop 
        L_000c: ret 
    }

}

You could skip the nops.
GeneralRe: I want to write a simple C# compiler Pin
Fired.Fish.Gmail4-Feb-10 18:11
Fired.Fish.Gmail4-Feb-10 18:11 
GeneralRe: I want to write a simple C# compiler Pin
harold aptroot5-Feb-10 3:28
harold aptroot5-Feb-10 3:28 
Questionc# forms property Pin
ric_c+programer2-Feb-10 20:29
ric_c+programer2-Feb-10 20:29 
AnswerRe: c# forms property Pin
Calla2-Feb-10 21:25
Calla2-Feb-10 21:25 
QuestionGUI automation? Pin
Tridip Bhattacharjee2-Feb-10 19:51
professionalTridip Bhattacharjee2-Feb-10 19:51 
AnswerRe: GUI automation? Pin
Eddy Vluggen2-Feb-10 22:33
professionalEddy Vluggen2-Feb-10 22:33 
QuestionGenerate a key press Pin
DoanDucTai2-Feb-10 19:39
DoanDucTai2-Feb-10 19:39 
AnswerRe: Generate a key press [modified] Pin
Nuri Ismail2-Feb-10 21:27
Nuri Ismail2-Feb-10 21:27 
AnswerRe: Generate a key press Pin
Giorgi Dalakishvili2-Feb-10 23:10
mentorGiorgi Dalakishvili2-Feb-10 23:10 
Questionmultithreading problem Pin
Member 5903102-Feb-10 19:33
Member 5903102-Feb-10 19:33 
AnswerRe: multithreading problem Pin
Calla2-Feb-10 20:23
Calla2-Feb-10 20:23 
AnswerRe: multithreading problem Pin
Luc Pattyn3-Feb-10 1:42
sitebuilderLuc Pattyn3-Feb-10 1:42 
QuestionHow to identify the application has been executed or not? Pin
BalasubramanianK2-Feb-10 19:22
BalasubramanianK2-Feb-10 19:22 
AnswerRe: How to identify the application has been executed or not? Pin
BalasubramanianK2-Feb-10 19:40
BalasubramanianK2-Feb-10 19:40 
Questiongdiplus jpeg encodng performance? Pin
Druuler2-Feb-10 17:29
Druuler2-Feb-10 17:29 
QuestionA good looking TreeView Pin
newstargate2-Feb-10 11:15
newstargate2-Feb-10 11:15 
AnswerRe: A good looking TreeView Pin
Super Lloyd2-Feb-10 11:28
Super Lloyd2-Feb-10 11:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.