-
Notifications
You must be signed in to change notification settings - Fork 0
ColdFusion vs. .NET C#
JessicaOPRD edited this page Jun 27, 2023
·
6 revisions
Description | ColdFusion | .NET/C# | Notes |
---|---|---|---|
Startup File | Application.cfc |
Program.cs , Startup.cs
|
Description | ColdFusion | .NET/C# | Notes |
---|---|---|---|
String interpolation/template | "Hello, #name" |
$"Hello, {Name}" |
Description | ColdFusion | .NET/C# | Notes |
---|---|---|---|
Count items in list | ListLen(list) |
List.Count() |
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. |
Testing what this does?