Re: how to keep a reference to an object?



on this way we keep just a reference to a object (32-bit) or we create a new
one?

You just copy the reference, no new object is created (assuming
object1 is a reference type). There's no need to make v0 a ByRef
parameter.


Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
.



Relevant Pages

  • Re: SyncLock - ByRef vs. ByVal
    ... >If I pass in a parameter using ByRef, is there a difference in the way ... Mattias ... Please reply only to the newsgroup. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: DefaultValueAttribute usage
    ... string is a reference type, ... passing it a string constant? ... Mattias Sjögren mattias @ mvps.org ...
    (microsoft.public.dotnet.framework)
  • Re: C# Fundamentals Part 2 (class vs. struct)
    ... That's only true for local variables. ... I guess that the variable (data member) of this ... reference type is just holding a pointer, ... Mattias Sjögren mattias @ mvps.org ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Is there a difference between passing "" and passing Nothing to a Windows API ?
    ... There's no boxing going on here, string is a reference type. ... Mattias Sjögren [C# MVP] mattias @ mvps.org ... Please reply only to the newsgroup. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Casting?
    ... ByRef indicates that you intend on modifying the caller's variable. ... references (you dereference the parameter, ... proven to be a performance problem via profiling (CLR Profiler is one ... >> A Reference Type is an object that exists on the heap. ...
    (microsoft.public.dotnet.languages.vb)