Click to See Complete Forum and Search --> : Function returns DataTable* from VC++ is an object or a pointer to the object?


wotan
December 17th, 2002, 08:01 AM
I have a VC++ managed class library. A function does return a DataTable*. I use this VC++ class from CSharp. Silly question but does CSharp get the pointer to the DataTable or the whole DataTable Object itsself? Should be the datatable pointer...

Thanks

Stefan

MartinL
December 17th, 2002, 08:58 AM
it is something as pointer, however you don't see it in c#...

Arild Fines
December 17th, 2002, 11:23 AM
C# uses reference(pointer) semantics for all class objects. You don't have variables that "is the object itself". It's always a pointer.

The above doesn't go for types declared as structs, though.