是否有任何指导或文档,以便TOM.NET中的哪些类替换Tridion的旧COM API中的功能?
我找不到与TDSE相对应的入口点.
我想将 Dictionary 的参数传递给方法。
public static void Method(Dictionary<string, string> hash)
Run Code Online (Sandbox Code Playgroud)
我真的很想使用内联集合初始值设定项
这是不合法的
Method({{"Foo", "Bar"}, {"Bing", "Bong"}})
Run Code Online (Sandbox Code Playgroud)
这也不是
Method(new {{"Foo", "Bar"}, {"Bing", "Bong"}})
Run Code Online (Sandbox Code Playgroud)
这是
// outside the class
using D = System.Collections.Generic.Dictionary<string, string>;
// calling with the type alias
Method(new D {{"Foo", "Bar"}, {"Bing", "Bong"}})
Run Code Online (Sandbox Code Playgroud)
这也是
// once in a library somewhere
class SD : System.Collections.Generic.Dictionary<string, string> {}
// calling with the class
Method(new SD {{"Foo", "Bar"}, {"Bing", "Bong"}})
Run Code Online (Sandbox Code Playgroud)
你有一个像这样的我不知道的好快捷方式来解决我的类型集合初始化吗?
该示例查询应用程序使用了!运算符引用DataRow中的字段.
Option Strict Off
Imports System.Data
Imports System.Linq
Module Program
Public Sub Main()
Dim numbers() As Integer = {5, 4, 1, 3, 9, 8, 6, 7, 2, 0}
Dim table As New DataTable("Numbers")
table.Columns.Add("number", GetType(Integer))
For Each n In numbers
table.Rows.Add(New Object() {n})
Next
Dim lowNums = From row In table.Rows _
Where row!number < 5
Select row
For Each x In lowNums
Console.WriteLine(x!number)
Next
End Sub
End Module
Run Code Online (Sandbox Code Playgroud)
是什么 !操作员叫?规则记录在哪里?