Hello World


private static void Main(string[] args)
{
    Person father = new Person();
    Person mother = new Person();
    Person girl = new Person();
 
    Person boy = mother.Emit(mother.Union(father),
        new DateTime(2007, 4, 21));
    girl.PromoteTo(Rank.BigSister);
 
    mother.Condition = Conditions.Well | Conditions.Tired;
    father.Condition = Conditions.Well | Conditions.Tired;
    boy.Condition = Conditions.Well;
    girl.Condition = Conditions.Happy;
 
    Console.WriteLine(boy.ToString());
}
Comments (20)

  1. MikeeeG says:

    Simple but elegant

  2. Benjamin says:

    Congratulations! 🙂

  3. INote says:

    Good one…

  4. Console.WriteLine("Congratulations!");

  5. downmoon says:

    MDSN的Blog上看到一篇很精致的文章–“HelloWorld

  6. Congratulations! Enjoy the riches of fatherhood.

  7. Off Topic: Yet another way to announce

  8. Lou says:

    Nicely said – and congratulations!

  9. Congratulations, argg..java …i’m rusty on it so I won’t even try, but here’s your future (seeing as how everythings web oriented, this is in js):

    function futurewithchild(){

    var parents="happy";

    var money=75000*24;

    var child=0;

    for (child<24;child++){

    money=money-(money*(child*0.5));

    if (child<18){

    parents="stressed"

    }else{

    parents="waiting for child to leave"

    }

    yea the code is sloppy but :p

  10. Jimmy says:

    Tillykke!

  11. Tillykke! Rimeligt nørdet og helt perfekt :-).

  12. David Jaggie says:

    I find the lack of error handling appalling.  A baby’s first core dump is usually quite messy to clean up after, if you’re unprepared.

    (Congrats!)

  13. robertbaumann says:

    private static void Main(string[] args)

    {    

       Person visitor = new Person("Robert Baumann");

       Person mark = new Person();

       visitor.Congratulate(mark);

    }

  14. Mark says:

    🙂 🙂 Stort tillykke!

  15. ploeh says:

    Thank you, all, for your greetings 🙂

  16. Josh Stodola says:

    Response.ContentType = "text/congrats"

    Response.Write("Congratulations, my friend")

    Response.End()

  17. MarkRonn says:

    Stort tillykke til Mark Seemann, som fik en velskabt søn. Som den superkoder han er, blev han nødt til

  18. Morten says:

    I think there is missing some initialization stuff between mother and father to make that work 🙂

    Perhaps some locking and syncronization between the two parent threads.

  19. Femi says:

    Here is a simple hello world program

    #include <stdio.h>

    #include <stdlib.h>

    int main(void)

    {

    char name;

    printf("Hello dere,..nn");

    printf("What is your name?nn");

    scanf("%s",name);

    printf("Hello %s, bye…",name);

    return (EXIT_SUCCESS);

    }

  20. 邀月 says:

    MDSN的Blog上看到一篇很精致的文章–“HelloWorld