Freigeben über


ChatHistory.CopyTo(ChatMessageContent[], Int32) Method

Definition

Copies all of the messages in the history to an array, starting at the specified destination array index.

public void CopyTo (Microsoft.SemanticKernel.ChatMessageContent[] array, int arrayIndex);
abstract member CopyTo : Microsoft.SemanticKernel.ChatMessageContent[] * int -> unit
override this.CopyTo : Microsoft.SemanticKernel.ChatMessageContent[] * int -> unit
Public Sub CopyTo (array As ChatMessageContent(), arrayIndex As Integer)

Parameters

array
ChatMessageContent[]

The destination array into which the messages should be copied.

arrayIndex
Int32

The zero-based index into array at which copying should begin.

Implements

Exceptions

array is null.

The number of messages in the history is greater than the available space from arrayIndex to the end of array.

arrayIndex is less than 0.

Applies to