Address of a reference?
Date: Thu, 04 Nov 2004 22:08:00 GMT
in one of the recent posts, I saw someone pass two variables of built-in
type (int and double), by reference, to a member function of a class. That
function then took the addresses of those reference parameters and stored
the results in member pointer variables.
Is that guaranteed to be ok? In other words, does taking the address of
a reference to a built-in type give you the address of the original
variable? I'd expect so (not having a clue what it might do instead) but it
seems very strange to me.
Personally, I'd have used pointers as the parameters themselves (passing
the address of the variables to the function), and then just copied the
pointers' contents to my member variables. But I'm just wondering if it's
ok (and/or normal?) to take the address of a reference to a variable (of
built-in type, which has no member operator & to call, as a user-defined
- Re: Deterministic destruction across scope and state machines in c#
... that will in-turn destroy or finalise all member objects of the class ... The only cleanup your code should worry about is when dealing with resources that ..NET itself cannot be aware of, either directly or indirectly (by holding a reference to an object that implements IDisposable). ... initiating the destruction). ... Properly encapsulated, it is trivial to add the necessary call to IDisposable.Dispose() when updating the current state reference there). ...
- Re: relating two tables with common field but not seeing data in forms.
... >this should bring up the query design grid with your two tables shown. ... >database table when you get a new csv file. ... >> member datafields to each record. ... >> example, to keep it simple, one reference number field and name field. ...
... Are you referring to this: ... returned value will be a special reference to the named object member. ... Where did I modify constants? ...
- Re: Passing a form reference gives error
... Define an Interface with two methods: ... then the form reference implements the ... member called lstFormControls. ... compiler and shouldn't matter at runtime. ...
- Re: Dumb Question About External References
... The ccp_01 class doesn't have a IsPostback member! ... Cannot access a nonstatic member of outer type 'ASP.ViewState02_aspx' ... An object reference is required for the nonstatic field, method, ...