Skip to content


.NET In ColdFusion: Undocumented ColdFusion MX 7.0 Functionality?

Today I was doing some research for a product I’m about to start working on, and I was surprised to find that you can actually do C# in CFScript.

For instance, give this a try (pardon the formatting.. it doesn’t quite work-out in XHTML):


<cfscript language="c#">
using System;
public class HelloWorld {
public static void Main() {
Console.WriteLine("The current date is " + getCurrentDate());
}
}
</cfscript>

Perhaps Macromedia is planning on moving away from Java and basing ColdFusion on .NET for the next major release?

Posted in A Day In The Life Of, ColdFusion.

9 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Jim said

    Doubt Macromedia will spill any news but it’s interesting - esp. with BlueDragon on .net…

  2. Very funny :)

  3. riiight….

  4. Very funny indeed… ha!

  5. Alex said

    The “#” in the language=”c#” was a dead giveway, right off the bat.

    If you had posted language=”csharp”, I would have had to copy the code into DW and execute it..*just to be sure* … ;-)

  6. Ralph said

    poor jim…

  7. Vince Bonfanti said

    Hmmm…who would the joke be on if it turned out this really worked in BlueDragon.NET? ;-)

  8. Vince,

    Well, I think the premise that this code would actually work is funny in and of itself– you’d have a server full of DOS windows open with the current date. Maybe I gave you guys (New Atlanta) an idea though. :)

    Actually, it reminds me of some ASP code I saw on DailyWTF.com once that had a beep() function in it (or something to that effect)…

  9. Vince Bonfanti said

    You’re right–I didn’t read the code carefully. But the idea of being able to code CFSCRIPT blocks using C# isn’t that far-fetched (with BD.NET).

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.