' Visual Basic
Dim t As ULTable = conn.ExecuteTable( _
"MyTable", "MyIndex", CommandBehavior.Default _
)
' The line above is equivalent to the following code:
' Dim cmd As ULCommand = conn.CreateCommand()
' cmd.CommandText = "MyTable"
' cmd.IndexName = "MyIndex"
' cmd.CommandType = CommandType.TableDirect
' Dim t As ULTable = cmd.ExecuteTable(CommandBehavior.Default)
' cmd.Dispose()
以下代码为 C# 语言等效代码:
// C#
ULTable t = conn.ExecuteTable(
"MyTable", "MyIndex", CommandBehavior.Default
);
// The line above is equivalent to the following code:
// ULTable t;
// using(ULCommand cmd = conn.CreateCommand())
// {
// cmd.CommandText = "MyTable";
// cmd.IndexName = "MyIndex";
// cmd.CommandType = CommandType.TableDirect;
// t = cmd.ExecuteTable(CommandBehavior.Default);
// }