Export (0) Print
Expand All
Cut
Run
Expand Minimize

AddImplementedInterface Method (General Extensibility)

Visual Studio .NET 2003

Adds an interface to the list of inherited objects.

Note   This method is not supported for Visual Basic .NET.
[Visual Basic .NET]
Public Function AddImplementedInterface( _
   Base As Variant, _
   Optional Position As Variant _
) As CodeInterface
[Visual Basic 6]
Function AddImplementedInterface( _
   Base As Variant, _
   Optional Position As Variant _
) As CodeInterface
[C++]
HRESULT __stdcall AddImplementedInterface(
   VARIANT Base,
   VARIANT Position,
   /* [out, retval] */ CodeInterface** retVal
);
[C#]
CodeInterface AddImplementedInterface(
   object Base,
   object Position
);
[JScript .NET]
public function AddImplementedInterface(
   Base : Object,
   Position : Object
) : CodeInterface

Parameters

Base
Required. The interface the class will implement. This is either a CodeClass or a fully-qualified type name.
Position
Optional. Default = 0. The code element after which to add the new element. If the value is a CodeElement, then the new element is added immediately after it.

If the value is Long, then AddImplementedInterface indicates the element after which to add the new element.

Because collections begin their count at 1, passing 0 indicates that the new element should be placed at the beginning of the collection. A value of -1 means the element should be placed at the end.

Return Value

Returns a CodeInterface object.

Remarks

Adds a reference to an interface so that the CodeClass promises to implement the interface. AddImplementedInterface does not insert method stubs for the interface members.

All languages support a period-separated format for the fully qualified type name, but some languages also support another particular format, such as a colon-separated (::) elements for Visual C++ .NET.

The correctness of the arguments is determined by the language behind the code model.

See Also

Applies To: CodeClass Object | CodeStruct Object | VCCodeClass Object | VCCodeStruct Object

Show:
© 2014 Microsoft