T
The Type to return.
CloneInContext<T>(CloningContext,Guid) Method
See Also 
SourceCode.Framework Namespace > PersistableObject Class > CloneInContext Method : CloneInContext<T>(CloningContext,Guid) Method



context
The context.
newGuid
The new unique identifier.

Glossary Item Box

Creates a new object that is a copy of the current instance.

Syntax

Visual Basic (Declaration) 
Public Overloads Function CloneInContext(Of T As PersistableObject)( _
   ByVal context As CloningContext, _
   ByVal newGuid As Guid _
) As T
Visual Basic (Usage)Copy Code
Dim instance As PersistableObject
Dim context As CloningContext
Dim newGuid As Guid
Dim value As T
 
value = instance.CloneInContext(Of T)(context, newGuid)
C# 
public T CloneInContext<T>( 
   CloningContext context,
   Guid newGuid
)
where T: PersistableObject
C++/CLI 
public:
T^ CloneInContextgeneric<typename T>
( 
   CloningContext^ context,
   Guid newGuid
) 
where T: PersistableObject

Parameters

context
The context.
newGuid
The new unique identifier.

Type Parameters

T
The Type to return.

Return Value

A new object that is a copy of this instance.

Exceptions

ExceptionDescription
System.Exception Unable to create Clone using the same Guid as Original. or

Requirements

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

See Also