Code2Xml.Core.Location.StructuredCode.StructuredCode C# (CSharp) Method

StructuredCode() public method

public StructuredCode ( string code ) : System.Collections.Generic
code string
return System.Collections.Generic
        public StructuredCode(string code) {
            Code = code;
            var indices = new List<int> { 0, 0 };
            for (int i = 0; i < code.Length; i++) {
                if (code[i] == '\n') {
                    indices.Add(i + 1);
                }
            }
            Indices = indices.AsReadOnly();
        }