using System.Diagnostics;
namespace NetPerformanceTest
const int ITEMS_COUNT = 100000;
static void Main(string[] args)
Stopwatch stopwatch = new Stopwatch();
Class[] classes = new Class[ITEMS_COUNT];
for (int i = 0; i < classes.Length; i++)
classes[i] = new Class();
double classMs = stopwatch.ElapsedTicks * 1000 / (double)Stopwatch.Frequency;
Struct[] structs = new Struct[ITEMS_COUNT];
for (int i = 0; i < structs.Length; i++)
structs[i] = new Struct();
double structMs = stopwatch.ElapsedTicks * 1000 / (double)Stopwatch.Frequency;
Console.WriteLine($"class = {classMs}; struct = {structMs}");