Public Class Form1
Public Class A1 : Implements ICloneable
Public para1 As String = "111"
Public para2 As String = "222"
Public Function Clone() As Object Implements System.ICloneable.Clone
Return MemberwiseClone()
End Function
End Class
Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.Click Dim a As A1 Dim b As A1 = a.Clone b.para1 = "333" b.para2 = "444" Dim tmp1 As String = a.para1 Dim tmp2 As String = a.para2 End Sub End Class
原文链接:https://www.f2er.com/vb/259979.html