Name
ExtensibleClassFactory
Synopsis
This class exposes the method
RegisterObjectCreationCallback()
, which
specifies a delegate that manufactures instances of a managed type.
Use this to build managed types that extend unmanaged types. Since
a managed type cannot directly inherit from an unmanaged type, the
managed type needs to aggregate an instance of the unmanaged type.
The delegate that you register with
RegisterObjectCreationCallback()
takes care of
creating the unmanaged type.
public sealed class ExtensibleClassFactory { // Public Static Methods public static method void RegisterObjectCreationCallback( ObjectCreationDelegate callback); }
Get C# in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.