using System.Collections.Generic;
using System.Diagnostics;
public static void Main()
for(int i = 0; i<1000; i++)
var personList = new List<Person>(500);
Stopwatch stopwatch = Stopwatch.StartNew();
for(int j = 0; j<1000000; j++)
personList.Add(new Person()
Property0 = rand.Next(2) == 0,
Property1 = rand.Next(2) == 0,
Property2 = rand.Next(2) == 0,
Property3 = rand.Next(2) == 0,
Property4 = rand.Next(2) == 0,
Property5 = rand.Next(2) == 0,
Property6 = rand.Next(2) == 0,
Property7 = rand.Next(2) == 0,
Property8 = rand.Next(2) == 0,
Property9 = rand.Next(2) == 0,
Property10 = rand.Next(2) == 0,
Property11 = rand.Next(2) == 0,
Property12 = (byte)rand.Next(256)
stopwatch = Stopwatch.StartNew();
for(int k = 0; k<personList.Count; k++)
if(personList[k].Property0 == true)
Console.WriteLine("data comparison took: "+stopwatch.ElapsedMilliseconds);
public bool Property0 { get; set; }
public bool Property1 { get; set; }
public bool Property2 { get; set; }
public bool Property3 { get; set; }
public bool Property4 { get; set; }
public bool Property5 { get; set; }
public bool Property6 { get; set; }
public bool Property7 { get; set; }
public bool Property8 { get; set; }
public bool Property9 { get; set; }
public bool Property10 { get; set; }
public bool Property11 { get; set; }
public byte Property12 { get; set; }