// 展開後
using System;
using System.Collections.Generic;
using UnityEngine;
public class Test : MonoBehaviour
{
//
// Methods
//
private void Start ()
{
List<int> list = new List<int> {
1,
2,
3,
4
};
foreach (int current in list) {
Debug.Log (current);
}
}
}
// 展開前
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Test : MonoBehaviour {
void Start (){
var list = new List<int> (){ 1, 2, 3, 4 };
foreach (var o in list)
Debug.Log (o);
}
}