> ## Documentation Index
> Fetch the complete documentation index at: https://notevil.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CAPLfunctionSetMethod

# SetMethod (obsolete)

[Valid for](../../../Shared/FeatureAvailability.md): CANoe DE

## Method Syntax

```plaintext theme={null}
long consumedMethodRef::SetMethod(Method method);
long providedMethodRef::SetMethod(Method method);
```

## Description

Sets the referred-to method for the CO reference.

## Parameters

* **method**: The new method.

## Return Values

* **0**: Success
* **3**: Given method doesn’t have the correct type
* **-1**: Given reference is invalid

## Example

```plaintext theme={null}
consumedMethodRef Services::IMirrors.SetPosition cmr;
cmr.SetMethod(Services::Mirrors.SetPosition);
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.