ICodeInjectionService.AppendStatements 方法
将 CodeDOM 语句的集合追加到指定的事件处理程序中。
命名空间: Microsoft.Windows.Design.Services
程序集: Microsoft.Windows.Design.Interaction(在 Microsoft.Windows.Design.Interaction.dll 中)
语法
声明
Sub AppendStatements ( _
method As CodeMemberMethod, _
statements As CodeStatementCollection, _
relativePosition As Integer _
)
void AppendStatements(
CodeMemberMethod method,
CodeStatementCollection statements,
int relativePosition
)
void AppendStatements(
CodeMemberMethod^ method,
CodeStatementCollection^ statements,
int relativePosition
)
abstract AppendStatements :
method:CodeMemberMethod *
statements:CodeStatementCollection *
relativePosition:int -> unit
function AppendStatements(
method : CodeMemberMethod,
statements : CodeStatementCollection,
relativePosition : int
)
参数
- method
类型:System.CodeDom.CodeMemberMethod
要搜索的方法定义(以便向其中追加语句)。
- statements
类型:System.CodeDom.CodeStatementCollection
要追加到方法的末尾的 CodeDOM 语句的列表。
- relativePosition
类型:System.Int32
要插入语句的行号。
备注
如果还没有方法体,则不会创建该参数。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。