Get class size of object

JS js.mdnq at gmail.com
Mon Aug 12 17:54:39 PDT 2013


On Monday, 12 August 2013 at 19:44:56 UTC, Jacob Carlborg wrote:
> On 2013-08-12 17:49, JS wrote:
>
>> Sorry but this doesn't work. b is a B, not an A.
>>
>> try
>>
>> I a = new A;
>> I b = new B;
>
> Right, forgot about the interface.


NP, happens to all of us. Simen's method of casting to object 
seems to be the easiest way to get it to work.


More information about the Digitalmars-d-learn mailing list