.net - How to distinguish that a type is ValueType Or RefereceType? -


Some simple types like int, string, .... It's easy to understand that they are ValueTypes or RefrenceTypes. Want to know what is the way to distinguish it?

There are values ​​of all the strings, nim and the original type.

At runtime you can check this type of:

  type type = type (TypeName); If (type.IsValueType) {// ...}  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -