ColdFusion vs. .NET C# - JessicaOPRD/docs GitHub Wiki
Cheatsheet
App Bootstrapping
Description | ColdFusion | .NET/C# | Notes |
---|---|---|---|
Startup File | Application.cfc |
Program.cs , Startup.cs |
CFScript vs. C#
Strings
Description | ColdFusion | .NET/C# | Notes |
---|---|---|---|
String interpolation/template | "Hello, #name" |
$"Hello, {Name}" |
Arrays and Lists
Description | ColdFusion | .NET/C# | Notes |
---|---|---|---|
Count items in list | ListLen(list) |
List.Count() |
Objects
Description | ColdFusion | .NET/C# | Notes |
---|---|---|---|
Declare new object | var items = { label = "Dogs" }; |
🔴 var items = new { Label = "Dogs" }; |
While this appears to output in debug tools OK, I could not determine how to access the dynamically created property. Possibly look into dynamic and explicit declaration of ExpandoObject (which feels very unnatural, not unlike PHP's stdClass ). This pattern is discouraged in favor of explicitly typed models, which is a big difference compared to CF and Javascript general conventions. |