Click here to Skip to main content
15,902,276 members
Home / Discussions / C#
   

C#

 
GeneralRe: Winforms and SQL Threading Problem Pin
Luc Pattyn3-Feb-10 5:12
sitebuilderLuc Pattyn3-Feb-10 5:12 
QuestionLINQ to parse EventLog Query [modified] Pin
Sunil G3-Feb-10 1:11
Sunil G3-Feb-10 1:11 
AnswerRe: LINQ to parse EventLog Query Pin
Ravi Bhavnani3-Feb-10 2:01
professionalRavi Bhavnani3-Feb-10 2:01 
AnswerRe: LINQ to parse EventLog Query Pin
Pete O'Hanlon3-Feb-10 2:14
mvePete O'Hanlon3-Feb-10 2:14 
AnswerRe: LINQ to parse EventLog Query Pin
Palash Biswas3-Feb-10 3:17
Palash Biswas3-Feb-10 3:17 
Questionmulticolumn listview Pin
Member 5903103-Feb-10 0:41
Member 5903103-Feb-10 0:41 
AnswerRe: multicolumn listview Pin
sanforjackass3-Feb-10 0:57
sanforjackass3-Feb-10 0:57 
AnswerRe: multicolumn listview Pin
OriginalGriff3-Feb-10 1:01
mveOriginalGriff3-Feb-10 1:01 
AnswerRe: multicolumn listview Pin
Ramkithepower3-Feb-10 1:22
Ramkithepower3-Feb-10 1:22 
QuestionFluentNHibernate mapping - No Persister for... Please help. Pin
Yoken3-Feb-10 0:04
Yoken3-Feb-10 0:04 
AnswerRe: FluentNHibernate mapping - No Persister for... Please help. Pin
Yoken3-Feb-10 21:07
Yoken3-Feb-10 21:07 
QuestionWork with MS office, PDF, files Pin
Hum Dum2-Feb-10 23:57
Hum Dum2-Feb-10 23:57 
Questionencryption & decryption Pin
3bood.ghzawi2-Feb-10 23:20
3bood.ghzawi2-Feb-10 23:20 
Questionapplication which allow multiple user to work on same file Pin
Sachin Pimpale2-Feb-10 23:03
Sachin Pimpale2-Feb-10 23:03 
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 

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.