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?
9 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
Doubt Macromedia will spill any news but it’s interesting - esp. with BlueDragon on .net…
Very funny
riiight….
Very funny indeed… ha!
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* …
poor jim…
Hmmm…who would the joke be on if it turned out this really worked in BlueDragon.NET?
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)…
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).