Re: Overcoming C# limitations
- From: "james.curran@xxxxxxxxx" <james.curran@xxxxxxxxx>
- Date: 18 Jun 2006 19:40:58 -0700
Danny Liberty wrote:
2. In C++ I could have defined a macro to instantiate an object and
then make a method call. For example:
#define MY_FUNC(x) MyObj a; a.func(x);
This would have been useful since I could use this macro in any scope
knowing that the destructor of MyObj (or instance a) will be called at
the end of the scope without explictly calling any function. For
example:
void Foo()
{
MY_FUNC(3);
.... more code....
} <-- destructor of MyObj would be called here
um... You want to hid the call to the ctor, and then have significant
action in the dtor. Forgive me, but I'm really glad I don't have to
maintain your code....
.
- Follow-Ups:
- Re: Overcoming C# limitations
- From: Danny Liberty
- Re: Overcoming C# limitations
- From: Michael C
- Re: Overcoming C# limitations
- References:
- Overcoming C# limitations
- From: Danny Liberty
- Overcoming C# limitations
- Prev by Date: Re: TypeLoadException
- Next by Date: RE: DataAdapter.Update() and DataTable.GetChanges() side effect.
- Previous by thread: Re: Overcoming C# limitations
- Next by thread: Re: Overcoming C# limitations
- Index(es):
Relevant Pages
|