AUnion oUnion; Short iShortValue = 1234; Long iLongValue = 5678; // Storing sets discriminator oUnion.ShortItem (iShortValue); oUnion.LongItem (iLongValue); // Retrieving must check discriminator if (oUnion._d () == 1) iShortValue = oUnion.ShortItem (); if (oUnion._d () == 2) iLongValue = oUnion.LongItem ();