Difference between revisions of "Xojo.Core.MemoryBlock.Clone"

From Xojo Documentation

(Created page with "{{MethodBox | name = Clone | ownertype = class | scope = public | parameters = | owner = Xojo.Core.MemoryBlock | returntype = Xojo.Core.MemoryBlock }} {{Description |...")
 
 
Line 11: Line 11:
 
== Sample Code ==
 
== Sample Code ==
 
<rbcode>
 
<rbcode>
Dim mb1 As New Xojo.Core.MemoryBlock(64)
+
Var mb1 As New Xojo.Core.MemoryBlock(64)
Dim mb2 As Xojo.Core.MemoryBlock = mb1.Clone
+
Var mb2 As Xojo.Core.MemoryBlock = mb1.Clone
 
</rbcode>
 
</rbcode>

Latest revision as of 17:25, 11 August 2019

Method

Xojo.Core.MemoryBlock.Clone() As Xojo.Core.MemoryBlock

Supported for all project types and targets.

Makes a copy of the MemoryBlock. If its size is known, it copies the content.

Sample Code

Var mb1 As New Xojo.Core.MemoryBlock(64)
Var mb2 As Xojo.Core.MemoryBlock = mb1.Clone