本文整理汇总了C#中ArrayList.Size方法的典型用法代码示例。如果您正苦于以下问题:C# ArrayList.Size方法的具体用法?C# ArrayList.Size怎么用?C# ArrayList.Size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArrayList
的用法示例。
在下文中一共展示了ArrayList.Size方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: testCount
public void testCount()
{
IList<string> list = new ArrayList<string>();
list.Add("hoi");
list.Add("noot");
AssertEquals(2, list.Size());
}
示例2: setItems
public void setItems(ArrayList items) {
for(int i = 0;i != items.Size();i++){
//if(items.li == 1) {
items.Set(i, "0" + items.Get(i));
//}
}
this.items = items;
}
示例3: SetVerticalCellRange
private Integer SetVerticalCellRange(LinkedDataRecord linkedDataRecord,
CellRangeAddressBase range) {
if (linkedDataRecord == null)
{
return null;
}
List<Ptg> ptgList = new ArrayList<Ptg>();
int rowCount = (range.GetLastRow() - range.GetFirstRow()) + 1;
int colCount = (range.GetLastColumn() - range.GetFirstColumn()) + 1;
for (Ptg ptg : linkedDataRecord.GetFormulaOfLink()) {
if (ptg is AreaPtgBase) {
AreaPtgBase areaPtg = (AreaPtgBase) ptg;
areaPtg.SetFirstRow(range.GetFirstRow());
areaPtg.SetLastRow(range.GetLastRow());
areaPtg.SetFirstColumn(range.GetFirstColumn());
areaPtg.SetLastColumn(range.GetLastColumn());
ptgList.Add(areaPtg);
}
}
linkedDataRecord.SetFormulaOfLink(ptgList.ToArray(new Ptg[ptgList.Size()]));
return rowCount * colCount;
}
示例4: loadMap
private void loadMap()
{
ArrayList<string> lines = new ArrayList<string>();
int width = 0;
int height = 0;
var scanner = new Scanner(SampleGame.map);
while (scanner.HasNextLine())
{
string line = scanner.NextLine();
// no more lines to read
if (line == null)
{
break;
}
if (!line.StartsWith("!"))
{
lines.Add(line);
width = Math.Max(width, line.Length);
}
}
height = lines.Size();
for (int j = 0; j < 12; j++)
{
string line = (string) lines.Get(j);
for (int i = 0; i < width; i++)
{
if (i < line.Length)
{
char ch = line[i];
Tile t = new Tile(i, j, char.GetNumericValue(ch));
tilearray.Add(t);
}
}
}
}