Razor (C) Sharp scripting...

Discussion in 'Ruby' started by SwarmShepherd, Sep 9, 2011.

  1. <!-- Single statement block. -->
    @{ var theMonth = DateTime.Now.Month; }
    <p>The numeric value of the current month: @theMonth</p>


    <!-- Multi-statement block. -->
    @{
    var outsideTemp = 79;
    var weatherMessage = "Hello, it is " + outsideTemp + " degrees.";

    }
    <p>Today's weather: @weatherMessage</p>

    ========================================================

    For my client-side work I've been looking around again (IronRuby,
    Sinatra, Mono, Rails...) and gosh darned but the most exciting thing
    I'm seeing this time around is this new "templating engine" from the
    Evil Empire.

    note var type for outsideTemp was never declared, note that converting
    itself to a String is automatic....

    The whole C# / Razor thing seems, somehow, like it might be largely
    inspired by Ruby?

    Just my humble impression.

    It seems a real shame that IronRuby isn't alive and well enough to
    kick it up with C# in this particular niche?


    Best,

    SwarmShepherd aka Thunk
     
    SwarmShepherd, Sep 9, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ron Stephens
    Replies:
    23
    Views:
    3,022
    Ron Stephens
    Apr 12, 2004
  2. Bytes RAZOR

    , Feb 11, 2006, in forum: C Programming
    Replies:
    0
    Views:
    413
  3. Bytes Razor starts today at 6am

    , Feb 12, 2006, in forum: C Programming
    Replies:
    1
    Views:
    317
    Flash Gordon
    Feb 12, 2006
  4. Bytes RAZOR

    , Feb 11, 2006, in forum: C++
    Replies:
    1
    Views:
    433
    Bob Hairgrove
    Feb 12, 2006
  5. Replies:
    0
    Views:
    343
Loading...

Share This Page