本文整理汇总了C#中System.Collections.Generic.System.Collections.Generic.List.get_Count方法的典型用法代码示例。如果您正苦于以下问题:C# System.Collections.Generic.List.get_Count方法的具体用法?C# System.Collections.Generic.List.get_Count怎么用?C# System.Collections.Generic.List.get_Count使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Collections.Generic.System.Collections.Generic.List
的用法示例。
在下文中一共展示了System.Collections.Generic.List.get_Count方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: tpLast_Enter
private void tpLast_Enter(object sender, System.EventArgs e)
{
this.btnBack.set_Enabled(true);
this.btnForward.set_Enabled(false);
System.Collections.Generic.List<string> errors = new System.Collections.Generic.List<string>();
System.Collections.Generic.List<string> warnings = new System.Collections.Generic.List<string>();
this.GlobalCheck(errors, warnings);
if (errors.get_Count() > 0)
{
this.lblErrors.set_Text("Обнаружено ошибок: " + ((int) errors.get_Count()));
this.lblErrors.set_ForeColor(System.Drawing.Color.Maroon);
}
else
{
this.lblErrors.set_Text("Ошибок не обнаружено");
this.lblErrors.set_ForeColor(System.Drawing.Color.DarkGreen);
}
if (warnings.get_Count() > 0)
{
this.lblWarnings.set_Text("Предупреждений: " + ((int) warnings.get_Count()));
this.lblWarnings.set_ForeColor(System.Drawing.Color.Maroon);
}
else
{
this.lblWarnings.set_Text("Предупреждений нет");
this.lblWarnings.set_ForeColor(System.Drawing.Color.DarkGreen);
}
this.tbErrors.set_Lines(errors.ToArray());
this.tbWarnings.set_Lines(warnings.ToArray());
this.BtnApply.set_Enabled((bool) (errors.get_Count() == 0));
}
示例2: ProcessDataPassporter
private static long[] ProcessDataPassporter(AIS.SN.Model.localhost.ExchangeRequestAddress[] addresses)
{
System.Collections.Generic.List<long> list = new System.Collections.Generic.List<long>();
AIS.SN.Model.localhost.ExchangeRequestAddress[] addressArray = addresses;
for (int i = 0; i < addressArray.Length; i = (int) (i + 1))
{
AIS.SN.Model.localhost.ExchangeRequestAddress address = addressArray[i];
long[] outs = address.Outs;
for (int k = 0; k < outs.Length; k = (int) (k + 1))
{
long num = outs[k];
list.Add(num);
}
AIS.SN.Model.DomainObjects.Views.ExchangeRequestAddress snAddress = GetAddresses(address);
if (!IsRejected(snAddress))
{
string str = Serializer.ToXml<AIS.SN.Model.DomainObjects.Views.ExchangeRequestAddress>(snAddress, (System.Text.Encoding) System.Text.Encoding.Unicode);
new ExchangeRequest { QueryId = "", Type = -1, XmlIn = str, Status = ExchangeStatus.Received, DateIn = System.DateTime.Now, OperationDate = snAddress.LastChangeDate, OutId = snAddress.FlatCardId }.SaveChanges();
}
}
long[] numArray = new long[list.get_Count()];
for (int j = 0; j < list.get_Count(); j = (int) (j + 1))
{
numArray[j] = list.get_Item(j);
}
return numArray;
}
示例3: RemoveNodesByLocalAddress
public void RemoveNodesByLocalAddress(ObjectList<LocalAddress> addressesSource, ObjectList<LocalAddress> la)
{
System.Collections.Generic.List<LocalAddress> list = new System.Collections.Generic.List<LocalAddress>();
foreach (LocalAddress address in la)
{
LocalAddress address2 = address;
while (true)
{
LocalAddress parent = address2.GetParent();
if (parent == LocalAddress.Null)
{
break;
}
list.Add(parent);
address2 = parent;
}
if (list.get_Count() == 0)
{
this.Load(addressesSource, false);
return;
}
for (int i = (int) (list.get_Count() - 1); i >= 0; i = (int) (i - 1))
{
this.GetNodeByAddress(list.get_Item(i)).OnBeforeExpand();
}
AddressesNode nodeByAddress = this.GetNodeByAddress(address);
if (nodeByAddress != null)
{
this.RemoveNode(nodeByAddress);
}
list.Clear();
}
if (this.OnChangeSelectAddresses != null)
{
this.OnChangeSelectAddresses();
}
}