Re: Re: Casting in VB.Net and C#
Cor,[color=blue]
> Has it to do with the old problem that a reference to a value cost more
> memory and processing than a copy of a value?[/color]
I'm not sure how you mean 'reference', do you mean reference parameters or
reference types?
You are correct using boxed value types will cost more memory & processing
time, as the values need to be boxed & unboxed (placed on the heap & removed
from the heap).
This thread is primarily about when a value type becomes a "reference type"
which occurs when you assign a value type to an object variable. Within the
CLR this is the box IL instruction. Its also about what's the best way to
refer to this "boxed value type". I use both "boxed value type" and
"reference type", as I consider a "boxed value type" is a "reference
type"...
Hope this helps
Jay
"Cor" <non@non.com> wrote in message
news:O68BmkjxDH A.2396@TK2MSFTN GP10.phx.gbl...[color=blue]
> Hi Jay,
>
> I followed this thread and did not understand well what it was all about.
>
> Has it to do with the old problem that a reference to a value cost more
> memory and processing than a copy of a value?
>
> Cor
>
>[/color]
Cor,[color=blue]
> Has it to do with the old problem that a reference to a value cost more
> memory and processing than a copy of a value?[/color]
I'm not sure how you mean 'reference', do you mean reference parameters or
reference types?
You are correct using boxed value types will cost more memory & processing
time, as the values need to be boxed & unboxed (placed on the heap & removed
from the heap).
This thread is primarily about when a value type becomes a "reference type"
which occurs when you assign a value type to an object variable. Within the
CLR this is the box IL instruction. Its also about what's the best way to
refer to this "boxed value type". I use both "boxed value type" and
"reference type", as I consider a "boxed value type" is a "reference
type"...
Hope this helps
Jay
"Cor" <non@non.com> wrote in message
news:O68BmkjxDH A.2396@TK2MSFTN GP10.phx.gbl...[color=blue]
> Hi Jay,
>
> I followed this thread and did not understand well what it was all about.
>
> Has it to do with the old problem that a reference to a value cost more
> memory and processing than a copy of a value?
>
> Cor
>
>[/color]
Comment