Accessing arrays and class fields with .NET profiling APIs

Introduction

Accessing managed arrays

var ints = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
var matrix = new int[,] { { 1, 1, 1, 1 }, { 2, 2, 2, 2 } };

Getting fields of a reference type instance

--> ClassType ClassParamReturnClass (ClassType obj)
| int32 <IntProperty>k__BackingField = 84
| int32 intField = 42
| String stringField = 43
ClassType obj = 0x00000276D0A98E78

References

--

--

Loves to understand how things work (MVP Developer Technologies)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store