length1 [C#] C# string.Substring 메서드 public string Substring (int startIndex); 인스턴스에서 startIndex부터 마지막까지의 부분 문자열을 검색한다. 현재의 인스턴스 값은 수정되지 않는다. *인덱스는 0부터 시작한다. using System; public class Example { public static void Main() { String[] pairs = { "Color1=red", "Color2=green", "Color3=blue", "Title=Code Repository" }; foreach (var pair in pairs) { int position = pair.IndexOf("="); if (position < 0) continue; Console.WriteLine("Key: {0}, .. 2019. 9. 26. 이전 1 다음