当前位置: 首页>>代码示例>>C#>>正文


C# StringList.Last方法代码示例

本文整理汇总了C#中StringList.Last方法的典型用法代码示例。如果您正苦于以下问题:C# StringList.Last方法的具体用法?C# StringList.Last怎么用?C# StringList.Last使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StringList的用法示例。


在下文中一共展示了StringList.Last方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FIELD

        void FIELD(StringList list)
        {
            ConfigField thisField; var tmpStartIndex = la.charPos;
            Expect(5);
            list.Add(t.val);
            thisField = this.MainField.GetKey(string.Join("/", list.ToArray()), ConfigField.KeyMode.CreateNew);
            if (thisField.IsClass)
            {
               thisField.ToField();
            }
            thisField.Name = t.val;
            KeysAdded.Add(string.Join("/", this.MainField.Key, string.Join("/", list.ToArray())).Replace("//", "/"));
            if(this.Range != null && string.Concat("/", string.Join("/", list.ToArray())).Equals(KeyToFind, StringComparison.InvariantCultureIgnoreCase))
            {
            this.Range.WholeStart = tmpStartIndex;
            this.Range.NameStart = t.charPos;
            this.Range.NameEnd = t.charPos + t.val.Length;
            };

            if (la.kind == 11) {
            Get();
            Expect(12);
            }
            Expect(13);
            object tmp; var beginIndex = la.charPos;
            if (la.kind == 8) {
            ARRAY(out tmp);
            thisField.Array = (object[])tmp;
            } else if (la.kind == 1 || la.kind == 2) {
            SCALAR(out tmp);
            thisField.Number = (double)tmp;
            } else if (la.kind == 3 || la.kind == 4) {
            STRING(out tmp);
            thisField.String = (string)tmp;
            } else if (la.kind == 14 || la.kind == 15) {
            BOOLEAN(out tmp);
            thisField.Boolean = (bool)tmp;
            } else if (StartOf(1)) {
            Get();
            tmp = new StringList(); (tmp as StringList).Add(t.val);
            } else SynErr(18);
            if (StartOf(2)) {
            Get();
            tmp = new StringList(); (tmp as StringList).Add(t.val);
            while (StartOf(2)) {
                Get();
                tmp = new StringList(); (tmp as StringList).Add(t.val);
            }
            thisField.String = string.Join(" ", (tmp as StringList).ToArray());
            }
            if(this.Range != null && string.Concat("/", string.Join("/", list.ToArray())).Equals(KeyToFind, StringComparison.InvariantCultureIgnoreCase))
            {
            this.Range.ValueStart = beginIndex;
            this.Range.ValueEnd = t.charPos + t.val.Length;
            this.Range.WholeEnd = la.charPos + la.val.Length;
            }

            Expect(10);
            list.Remove(list.Last());
        }
开发者ID:X39,项目名称:ArmA-UI-Editor,代码行数:60,代码来源:Parser.cs

示例2: CONFIG

        void CONFIG(StringList list)
        {
            ConfigField thisField; var tmpStartIndex = la.charPos;
            Expect(6);
            Expect(5);
            list.Add(t.val);
            thisField = this.MainField.GetKey(string.Join("/", list.ToArray()), ConfigField.KeyMode.CreateNew);
            if (!thisField.IsClass)
            {
               thisField.ToClass();
            }
            thisField.Name = t.val;
            if(this.Range != null && string.Concat("/", string.Join("/", list.ToArray())).Equals(KeyToFind, StringComparison.InvariantCultureIgnoreCase))
            {
            this.Range.WholeStart = tmpStartIndex;
            this.Range.NameStart = t.charPos;
            this.Range.NameEnd = t.charPos + t.val.Length;
            };

            if (la.kind == 7) {
            Get();
            Expect(5);
            thisField.ConfigParentName = t.val;
            }
            if (la.kind == 8) {
            Get();
            var beginIndex = la.charPos;
            while (la.kind == 5 || la.kind == 6) {
                if (la.kind == 5) {
                    FIELD(list);
                } else {
                    CONFIG(list);
                }
            }
            if(this.Range != null && string.Concat("/", string.Join("/", list.ToArray())).Equals(KeyToFind, StringComparison.InvariantCultureIgnoreCase))
            {
            this.Range.ValueStart = beginIndex;
            this.Range.ValueEnd = t.charPos + t.val.Length;
            }

            Expect(9);
            }
            Expect(10);
            if(this.Range != null && string.Concat("/", string.Join("/", list.ToArray())).Equals(KeyToFind, StringComparison.InvariantCultureIgnoreCase))
            {
            this.Range.WholeEnd = t.charPos + t.val.Length;
            }
            KeysAdded.Add(string.Join("/", this.MainField.Key, string.Join("/", list.ToArray())).Replace("//", "/"));
                   list.Remove(list.Last());
        }
开发者ID:X39,项目名称:ArmA-UI-Editor,代码行数:50,代码来源:Parser.cs


注:本文中的StringList.Last方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。