All objects that are not inherited from the reference type System.ValueType?

Do I correctly assume that any object that does not inherit from System.ValueType , therefore, by definition, must be a reference type?

I could not find the final documentation to back up this concept.

+7
source share
3 answers

Check if it helps.

enter image description here

+6
source

If you read Remarks carefully, you will see that

Data types are divided into value types and reference types. Cost types are either distributed across the stacks or distributed within the structure. Link types are highlighted as heaps. Both types of references and values ​​obtained from the final object of the base class. In cases where it is necessary for the value type to behave like an object, a wrapper that makes the value type look like a reference object allocated to a heap, and the value of the value type is copied to it. The wrapper therefore the system knows that it contains the value type. This process is known as boxing, and the reverse process is called unboxing. Boxing and unboxing allow any type to be processed as an object.

The C # compiler does a wonderful job of making you think value types like int long have methods

+1
source

If you were on QI, and Stephen Fry was doing his usual thing in that an impressionable idiot thinks that a smart person is like, then he would react to "any object that does not inherit from System.ValueType, so by definition be a reference type "with klaxon and a blinking screen saying" all objects are value types or reference types. "

He then went on to indicate that, initially in the field of computer science, an object meant any entity that a computer could control, and therefore included pointers that have .NET, even if they do not correspond to a later definition of a word (a word later spoken with a certain connotation indulgence), which refers to objects that are encapsulated by their methods, and therefore you are mistaken.

Alan Davis would say that everyone knows what you had in mind, but it would be too late, your expression would only serve to fuel a hot, warm, hot mood, especially because technology may be second only to Oscar Wilde in the ranks things that he likes to think that he can speak reasonably (and perhaps has no equal in things about which he knows nothing, now I think about it, there is no way that he could say above, and make no mistake in some way).

In other words, yes, you are absolutely right :)

(Apologizes to those who have not seen a lot of British television, and therefore have no idea what this means).

0
source

All Articles