Vb.net 复制类

前端之家收集整理的这篇文章主要介绍了Vb.net 复制类前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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

猜你在找的VB相关文章