Share via


ChatHistory.IndexOf(ChatMessageContent) Method

Definition

Searches for the specified message and returns the index of the first occurrence.

public int IndexOf (Microsoft.SemanticKernel.ChatMessageContent item);
abstract member IndexOf : Microsoft.SemanticKernel.ChatMessageContent -> int
override this.IndexOf : Microsoft.SemanticKernel.ChatMessageContent -> int
Public Function IndexOf (item As ChatMessageContent) As Integer

Parameters

item
ChatMessageContent

The message to locate.

Returns

The index of the first found occurrence of the specified message; -1 if the message could not be found.

Implements

Exceptions

item is null.

Applies to