Re: out equivalent in MC++

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Tomas Restrepo \(MVP\) (tomasr_at_mvps.org)
Date: 03/19/04


Date: Thu, 18 Mar 2004 20:48:49 -0500

Hi Danil,

> Yeah, when I answered I was thinking at the standard C++.
>
> Anyway I do not see why anyone would use
> > System::Runtime::InteropServices::OutAttribute attribute.
>
> when it can use a reference or a pointer unless it has to write a piece of
> code that needs to work with C# and it this case probably it will use your
> solution.

Ahh, that ;) Well, explicitness would be one reason (and if you're writing
managed code, then you *should* be thinking about how things are going to
look from the outside, or at least that's my opinion).

-- 
Tomas Restrepo
tomasr@mvps.org


Relevant Pages

  • Re: Question on LSP
    ... Sure, the developer must keep track of which type has been assigned to each pointer to manage complexity in creating the design, which is why the 'T' is in T*. ... Subtyping is a relation which does not ... Those object types are completely orthogonal to the semantics of being an object reference. ... aggregate references, is the aggregate of referenced objects or target ...
    (comp.object)
  • Re: Question on LSP
    ... Because construction paradigms have different goals. ... But that has nothing to do with what a pointer type ... But that does not mean that the semantics of an object reference is ... aggregate references, is the aggregate of referenced objects or target ...
    (comp.object)
  • Re: Question on LSP
    ... equivalent addresses in the same context. ... Note that the language allows us to use a name like 'T' on the reference as a mnemonic so that the developer can keep track of what is happening with the indirection. ... Modern languages have proper pointer types. ...
    (comp.object)
  • Re: Nothing Keyword Destories Objects rather than just resetting the variable to an empty variable
    ... there is no difference between using ByVal or ByRef. ... as the C1 pointer was the sole reference to the class object. ... Yes, an object variable is a pointer to an object, but that is the only ... the keyword "NOTHING" should only destroy the ...
    (microsoft.public.excel.programming)
  • Re: How java passes object references?
    ... to think of them as being a specific location in a larger block of memory ... Whether a language passes by reference or by value, ... is a pointer pointing at the memory block. ... So when allocating local memory for o, it would simply allocate a ...
    (comp.lang.java.programmer)