Find if a object is of Reference or Value type

By [)ia6l0 iii

Use the default keyword to find if an object is of Reference or Value type

Code sample below:

Object myObject….
string typeOfObject =
default(typeof(myObject)) == null ? "reference": "value";

Find if a object is of Reference or Value type  (619 Views)