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


C# ArrayList.Get方法代码示例

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


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

示例1: 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;
		}
开发者ID:jeedey93,项目名称:xamarin-android-samples,代码行数:8,代码来源:CalendarAdapter.cs

示例2: GetFirstItemTest

 [TestMethod] // Получение первого элемента
 public void GetFirstItemTest()
 {
     int n = 2;
     ArrayList<object> data = new ArrayList<object>(n);
     data.Append(9);
     data.Append(5);
     data.Get(0);
 }
开发者ID:steeparts,项目名称:Muftiyev_Arthur_06,代码行数:9,代码来源:ArrayListTest.cs

示例3: GetLastItemTest

 [TestMethod] // Получение последнего элемента
 public void GetLastItemTest()
 {
     int n = 2;
     ArrayList<object> data = new ArrayList<object>(n);
     data.Append(8);
     data.Append(10);
     data.Get(1);
 }
开发者ID:steeparts,项目名称:Muftiyev_Arthur_06,代码行数:9,代码来源:ArrayListTest.cs

示例4: Find

    /**
     * Find hyperlink assigned to the supplied shape
     *
     * @param shape  <code>Shape</code> to lookup hyperlink in
     * @return found hyperlink or <code>null</code>
     */
    protected static Hyperlink Find(Shape shape){
        ArrayList lst = new ArrayList();
        SlideShow ppt = shape.Sheet.GetSlideShow();
        //document-level Container which stores info about all links in a presentation
        ExObjList exobj = ppt.GetDocumentRecord().GetExObjList();
        if (exobj == null) {
            return null;
        }

        EscherContainerRecord spContainer = shape.GetSpContainer();
        for (Iterator<EscherRecord> it = spContainer.GetChildIterator(); it.HasNext(); ) {
            EscherRecord obj = it.next();
            if (obj.GetRecordId() ==  EscherClientDataRecord.RECORD_ID){
                byte[] data = obj.Serialize();
                Record[] records = Record.FindChildRecords(data, 8, data.Length-8);
                if(records != null) Find(records, exobj, lst);
            }
        }

        return lst.Count == 1 ? (Hyperlink)lst.Get(0) : null;
    }
开发者ID:hanwangkun,项目名称:npoi,代码行数:27,代码来源:Hyperlink.cs

示例5: TestConstructor6

 public void TestConstructor6()
 {
     ArrayList<String> strings = new ArrayList<String>();
     for (int i = 0; i < SIZE; ++i)
     {
         strings.Add(i.ToString());
     }
     LinkedBlockingQueue<String> q = new LinkedBlockingQueue<String>(strings);
     for (int i = 0; i < SIZE; ++i)
     {
         Assert.AreEqual(strings.Get(i), q.Poll());
     }
 }
开发者ID:tabish121,项目名称:NMS.Pooled,代码行数:13,代码来源:LinkedBlockingQueueTest.cs

示例6: TestAddAll5

        public void TestAddAll5()
        {
            ArrayList<String> empty = new ArrayList<String>();
            ArrayList<String> strings = new ArrayList<String>(SIZE);

            for (int i = 0; i < SIZE; ++i)
            {
                strings.Add(i.ToString());
            }
            LinkedBlockingQueue<String> q = new LinkedBlockingQueue<String>(SIZE);
            Assert.IsFalse(q.AddAll(empty));
            Assert.IsTrue(q.AddAll(strings));
            for (int i = 0; i < SIZE; ++i)
            {
                Assert.AreEqual(strings.Get(i), q.Poll());
            }
        }
开发者ID:tabish121,项目名称:NMS.Pooled,代码行数:17,代码来源:LinkedBlockingQueueTest.cs

示例7: 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);
                    }

                }
            }

        }
开发者ID:MahendrenGanesan,项目名称:samples,代码行数:43,代码来源:GameScreen.cs


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