VCCodeStruct.AddImplementedInterface(Object, Object) 方法

定义

向继承对象列表添加接口。

EnvDTE::CodeInterface AddImplementedInterface(winrt::Windows::Foundation::IInspectable const & Base, winrt::Windows::Foundation::IInspectable const & Position);
[System.Runtime.InteropServices.DispId(63)]
public EnvDTE.CodeInterface AddImplementedInterface (object Base, object Position);
[<System.Runtime.InteropServices.DispId(63)>]
abstract member AddImplementedInterface : obj * obj -> EnvDTE.CodeInterface
Public Function AddImplementedInterface (Base As Object, Optional Position As Object) As CodeInterface

参数

Base
Object

必需。 该类将实现的接口。 这是 CodeInterface 或完全限定的类型名称。

Position
Object

可选。 默认值 = 0。 将在其后添加新元素的代码元素。 如果该值为 CodeElement,则紧跟在其后添加新元素。

如果该值为 Long 数据类型,则 AddImplementedInterface(Object, Object) 指示要在哪个元素后添加新元素。

因为集合从 1 开始计数,所以传递 0 指示应将新元素放置在集合的开始处。 值为 -1 表示应将元素放在结尾处。

返回

CodeInterface

CodeInterface 对象。

属性

注解

AddImplementedInterface 将引用添加到承诺实现的接口 CodeClassAddImplementedInterface 不插入接口成员的方法存根。

Visual C++ 要求其完全限定的类型名称以冒号分隔 (:: ) 格式。 所有其他语言支持句号分隔格式。

参数的正确性由代码模型后面的语言确定。

适用于