Table of Contents

Class CloneClassAsSharedRef

Namespace
Dec
Assembly
dec.dll

Signals that this class should be "cloned" by simply duplicating the reference.

[AttributeUsage(AttributeTargets.Class)]
public class CloneClassAsSharedRef : Attribute
Inheritance
object
Attribute
CloneClassAsSharedRef

Remarks

This is (obviously) much faster than copying the class, though it also (obviously) leaves you with a "clone" that shares state with the original. Great for immutable classes or classes wrapped in copy-on-write structures.