How many nanoseconds does a call to GetProperties() take?
问题 In relation to: Big-O of .GetProperties() How many nanoseconds does the .GetProperties() method take in C#? EDIT Tested: On simple dev computer (nothing fancy), item has 8 properties, and no inheritance: stopwatch.Start(); for (int i = 0; i < 10000; i++) { PropertyInfo[] properties = item.GetType().GetProperties(); } stopwatch.Stop(); Results: Total Time in Nanoseconds: 16,569.8 Total Time in Milliseconds: 16.5698 Average Time Per .GetProperties() Call: 1.65 ns (This is an assumption, not