기술 자료

Unity Engine


User Manual

Script Reference

Unity Engine


ForEach

Invokes function on all elements matching the query.
읽는 시간 1분최근 업데이트: 24일 전

Definition

ForEach(Action<T>)

Invokes function on all elements matching the query.
public void ForEach(Action<T> funcCall)

Parameters

funcCall

The action to be invoked with each matching element.

ForEach<T>(List<T>, Func<T, T>)

Invokes function on all elements matching the query.
public void ForEach<T2>(List<T2> result, Func<T, T2> funcCall)

Parameters

result

Each return value will be added to this list.

funcCall

The function to be invoked with each matching element.

ForEach<T>(Func<T, T>)

Invokes function on all elements matching the query.
public List<T2> ForEach<T2>(Func<T, T2> funcCall)

Parameters

funcCall

The action to be invoked with each matching element.

Returns

Type

Description

List<T>