本文整理汇总了C#中StringList.Remove方法的典型用法代码示例。如果您正苦于以下问题:C# StringList.Remove方法的具体用法?C# StringList.Remove怎么用?C# StringList.Remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringList
的用法示例。
在下文中一共展示了StringList.Remove方法的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());
}
示例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());
}