CSharp · Console
using System;
using System.Collections.Generic;
using System.Linq;
public class Program
{
public static void Main()
{
int count = 10;
List<DropItem> _items = Enumerable.Range(0, count).Select(x => new DropItem(){Name = "Cam " + x, Identifier = "Drop Zone" + ((x < count / 2) ? 1 : 2), cam_idx = x}).ToList();
foreach (DropItem i in _items)
{
Console.WriteLine("Name {0}, Identifier {1}, cam_idx{2}", i.Name, i.Identifier, i.cam_idx);
}
}
public class DropItem
{
public string Name { get; set; }
public string Identifier { get; set; }
public int cam_idx { get; set; }
}
}