c# 강의/수업내용(문법 관련)

forEach 문에서 일반배열 인덱스 사용법

쪼혀 2020. 4. 17. 16:24

> 일반배열

   string[] testList = new string[10];
            testList[0] = "일";
            testList[1] = "이";

            foreach (string item in testList)
            {
                int index = Array.IndexOf( testList, item ); 
            }