當前位置: 首頁>>代碼示例>>C#>>正文


C# util.ArrayList類代碼示例

本文整理匯總了C#中java.util.ArrayList的典型用法代碼示例。如果您正苦於以下問題:C# ArrayList類的具體用法?C# ArrayList怎麽用?C# ArrayList使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ArrayList類屬於java.util命名空間,在下文中一共展示了ArrayList類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: DowngradeActionMap

 public DowngradeActionMap()
 {
   base.\u002Ector();
   DowngradeActionMap downgradeActionMap = this;
   this.actionMap = new HashMap();
   this.actionList = new ArrayList();
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:7,代碼來源:DowngradeActionMap.cs

示例2: EntityPainting

        public EntityPainting(World world, int i, int j, int k, int l)
            : this(world)
        {
            xPosition = i;
            yPosition = j;
            zPosition = k;
            var arraylist = new ArrayList();
            EnumArt[] aenumart = EnumArt.values();
            int i1 = aenumart.Length;
            for (int j1 = 0; j1 < i1; j1++)
            {
                EnumArt enumart = aenumart[j1];
                art = enumart;
                func_179_a(l);
                if (onValidSurface())
                {
                    arraylist.add(enumart);
                }
            }

            if (arraylist.size() > 0)
            {
                art = (EnumArt) arraylist.get(rand.nextInt(arraylist.size()));
            }
            func_179_a(l);
        }
開發者ID:riverar,項目名稱:Crafty,代碼行數:26,代碼來源:EntityPainting.cs

示例3: getCollidingBoundingBoxes

 public override void getCollidingBoundingBoxes(World world, int i, int j, int k, AxisAlignedBB axisalignedbb,
     ArrayList arraylist)
 {
     int l = world.getBlockMetadata(i, j, k);
     if (l == 0)
     {
         setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 0.5F, 1.0F);
         base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
         setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
         base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
     }
     else if (l == 1)
     {
         setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 1.0F, 1.0F);
         base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
         setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
         base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
     }
     else if (l == 2)
     {
         setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 0.5F);
         base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
         setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 1.0F, 1.0F);
         base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
     }
     else if (l == 3)
     {
         setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
         base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
         setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 0.5F, 1.0F);
         base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
     }
     setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
 }
開發者ID:riverar,項目名稱:Crafty,代碼行數:34,代碼來源:BlockStairs.cs

示例4: super

     : super(declaringType, name) {
     parameters = new ArrayList<ParameterInfo>();
     exceptions = new ArrayList<TypeInfo>();
     genericArguments = new ArrayList<TypeInfo>();
     annotations = new ArrayList<AnnotationValue>();
     codeGenerator = new CodeGenerator(this);
 }
開發者ID:nagyistoce,項目名稱:cnatural-language,代碼行數:7,代碼來源:MethodBuilder.stab.cs

示例5: testConstructedGenericClass

		public void testConstructedGenericClass() {
			var typeSystem = new Library(new String[] { bin });
			var typeInfo = typeSystem.getType("stab/bytecode/test/classes/GenericClass");
			var args = new ArrayList<TypeInfo>();
			args.add(typeSystem.getType("java/lang/String"));
			doTest("ConstructedGenericClass", typeSystem.getGenericType(typeInfo, args));
		}
開發者ID:nagyistoce,項目名稱:cnatural-language,代碼行數:7,代碼來源:TypeSystemTest.stab.cs

示例6: signatures

 private static ArrayList signatures([In] Class[] obj0, [In] Annotation[][] obj1)
 {
   ArrayList arrayList = new ArrayList();
   for (int index = 0; index < obj0.Length; ++index)
     arrayList.add((object) new ParameterSignature(obj0[index], obj1[index]));
   return arrayList;
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:7,代碼來源:ParameterSignature.cs

示例7: BuildListView

        void BuildListView(QStandardItemModel listModel, ListModel model)
        {
            listModel.setRowCount(model.GetItems().Count);
            listModel.setColumnCount(6);
            ArrayList list = new ArrayList();
            list.add("Extension");
            list.add("Color");
            list.add("Description");
            list.add("> Bytes");
            list.add("% Bytes");
            list.add("Files");
            listModel.setHorizontalHeaderLabels(list);
            int i = 0;
            foreach (var item in model.GetItems())
            {
                com.trolltech.qt.core.QModelIndex index = listModel.index(i, 0);
                listModel.setData(i, 0, item.Extension);
                listModel.setData(i, 1, item.Color.ToString());
                listModel.setData(i, 2, item.Description);
                listModel.setData(i, 3, ListModel.FormatSizeString(item.Bytes));
                listModel.setData(i, 4, string.Format("{0:P1}", (item.PercentBytes)));
                listModel.setData(i, 5, item.FileCount.ToString());

                i++;
            }
        }
開發者ID:joncham,項目名稱:NDirStat,代碼行數:26,代碼來源:MainWindow.cs

示例8: readWatchableObjects

        public static List readWatchableObjects(DataInputStream datainputstream)
        {
            ArrayList arraylist = null;
            for (byte byte0 = datainputstream.readByte(); byte0 != 127; byte0 = datainputstream.readByte())
            {
                if (arraylist == null)
                {
                    arraylist = new ArrayList();
                }
                int i = (byte0 & 0xe0) >> 5;
                int j = byte0 & 0x1f;
                WatchableObject watchableobject = null;
                switch (i)
                {
                    case 0: // '\0'
                        watchableobject = new WatchableObject(i, j, Byte.valueOf(datainputstream.readByte()));
                        break;

                    case 1: // '\001'
                        watchableobject = new WatchableObject(i, j, Short.valueOf(datainputstream.readShort()));
                        break;

                    case 2: // '\002'
                        watchableobject = new WatchableObject(i, j, Integer.valueOf(datainputstream.readInt()));
                        break;

                    case 3: // '\003'
                        watchableobject = new WatchableObject(i, j, Float.valueOf(datainputstream.readFloat()));
                        break;

                    case 4: // '\004'
                        watchableobject = new WatchableObject(i, j, datainputstream.readUTF());
                        break;

                    case 5: // '\005'
                        short word0 = datainputstream.readShort();
                        byte byte1 = datainputstream.readByte();
                        short word1 = datainputstream.readShort();
                        watchableobject = new WatchableObject(i, j, new ItemStack(word0, byte1, word1));

                        // fall through (not.. c#..)

                        int k2 = datainputstream.readInt();
                        int l2 = datainputstream.readInt();
                        int i12 = datainputstream.readInt();
                        watchableobject = new WatchableObject(i, j, new ChunkCoordinates(k2, l2, i12));

                        break;
                    case 6: // '\006'
                        int k = datainputstream.readInt();
                        int l = datainputstream.readInt();
                        int i1 = datainputstream.readInt();
                        watchableobject = new WatchableObject(i, j, new ChunkCoordinates(k, l, i1));
                        break;
                }
                arraylist.add(watchableobject);
            }

            return arraylist;
        }
開發者ID:riverar,項目名稱:Crafty,代碼行數:60,代碼來源:DataWatcher.cs

示例9: KeyedComboBoxModel

 public KeyedComboBoxModel()
 {
   base.\u002Ector();
   KeyedComboBoxModel keyedComboBoxModel = this;
   this.data = new ArrayList();
   this.listdatalistener = new ArrayList();
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:7,代碼來源:KeyedComboBoxModel.cs

示例10: DefaultKeyedValues

 public DefaultKeyedValues()
 {
   base.\u002Ector();
   DefaultKeyedValues defaultKeyedValues = this;
   this.keys = new ArrayList();
   this.values = new ArrayList();
   this.indexMap = new HashMap();
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:8,代碼來源:DefaultKeyedValues.cs

示例11: CodeGenerator

 CodeGenerator(MethodBuilder method) {
     this.instructions = new ArrayList<Instruction>();
     this.method = method;
     this.scopes = new ArrayList<ScopeInfo>();
     this.locals = new ArrayList<LocalInfo>();
     this.exceptionTable = new ArrayList<ExceptionHandler>();
     this.lineNumbers = new ArrayList<LineNumberInfo>();
 }
開發者ID:nagyistoce,項目名稱:cnatural-language,代碼行數:8,代碼來源:CodeGenerator.stab.cs

示例12: CanSetAlertHandler

        public void CanSetAlertHandler()
        {
            var webClient = new WebClient(BrowserVersion.FIREFOX_38);

            List collectedAlerts = new ArrayList();
            var alertHandler = new CollectingAlertHandler(collectedAlerts);
            webClient.AlertHandler = alertHandler;
        }
開發者ID:HtmlUnit,項目名稱:NHtmlUnit,代碼行數:8,代碼來源:WebClientTests.cs

示例13: Description

 private Description(string _param1, params Annotation[] _param2)
 {
   base.\u002Ector();
   Description description = this;
   this.fChildren = new ArrayList();
   this.fDisplayName = param0;
   this.fAnnotations = param1;
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:8,代碼來源:Description.cs

示例14: LWSubsystem

 public LWSubsystem()
   : base(true)
 {
   LWSubsystem lwSubsystem = this;
   this.preferredSize = new Dimension(100, 100);
   this.selected = (Widget) null;
   this.widgets = new ArrayList(20);
   MainPanel.getPanel("LiveWindow").addSubsystem(this);
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:9,代碼來源:LWSubsystem.cs

示例15: Parameterized

 public Parameterized(Class klass)
   : base(klass, Collections.emptyList())
 {
   Parameterized parameterized = this;
   this.runners = new ArrayList();
   List parametersList = this.getParametersList(this.getTestClass());
   for (int index = 0; index < parametersList.size(); ++index)
     this.runners.add((object) new Parameterized.TestClassRunnerForParameters(this, this.getTestClass().getJavaClass(), parametersList, index));
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:9,代碼來源:Parameterized.cs


注:本文中的java.util.ArrayList類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。