Visual Basic (Declaration) | |
---|---|
Protected Overloads Function EnsureClonedInstance(Of T As PersistableObject)( _ ByVal originalItem As PersistableObject _ ) As T |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As PersistableObject Dim originalItem As PersistableObject Dim value As T value = instance.EnsureClonedInstance(Of T)(originalItem) |
C# | |
---|---|
protected T EnsureClonedInstance<T>( PersistableObject originalItem ) where T: PersistableObject |
C++/CLI | |
---|---|
protected: T^ EnsureClonedInstancegeneric<typename T> ( PersistableObject^ originalItem ) where T: PersistableObject |
Parameters
- originalItem
Type Parameters
- T
Return Value
Returns the cloned instance if the object has been cloned.
The cloned instance will be returned if the object has been cloned before. If the clone did not execute in context, the original item will be cloned every time the method is called.
If a cloning context exists, the object will be cloned only once, and will return the same instance in subsequent calls.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2