-
-
Save Hironyi/4c0f630b8f83abefea9cd84980c777d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using UnityEngine; | |
public class TestForEach : MonoBehaviour | |
{ | |
public List<TestClass> testClass; | |
private void Start() | |
{ | |
//ForEachを使った時の処理 | |
testClass.ForEach(test => test.Test()); | |
//foreachで書いたとき。 | |
foreach (var test in testClass) | |
{ | |
test.Test(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment