Click here to Skip to main content
15,896,118 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: TextBox Border Pin
Dave Kreskowiak18-Nov-05 14:05
mveDave Kreskowiak18-Nov-05 14:05 
GeneralRe: TextBox Border Pin
eagertolearn18-Nov-05 14:08
eagertolearn18-Nov-05 14:08 
GeneralRe: TextBox Border Pin
Dave Kreskowiak20-Nov-05 12:47
mveDave Kreskowiak20-Nov-05 12:47 
GeneralRe: TextBox Border Pin
eagertolearn20-Nov-05 19:37
eagertolearn20-Nov-05 19:37 
QuestionTo clone an object Pin
irapov18-Nov-05 11:10
irapov18-Nov-05 11:10 
AnswerRe: To clone an object Pin
Joshua Quick18-Nov-05 14:37
Joshua Quick18-Nov-05 14:37 
GeneralRe: To clone an object Pin
irapov18-Nov-05 18:33
irapov18-Nov-05 18:33 
AnswerRe: To clone an object Pin
Joshua Quick18-Nov-05 21:22
Joshua Quick18-Nov-05 21:22 
You need to call the Clone() method to make a copy of an object.

Dim obj1 As New Foo<br />
Dim obj2 As Foo = DirectCast(obj1.Clone(), Foo)


But be aware that it'll only create a shallow copy. Meaning that the reference member variables in both the clone and source will still reference the same objects in the heap. If you want the clone's member references to refer to new objects/copies, then you'll need to clone its member variables too.

Public Class Bar : Implements ICloneable
   Public Data As Integer ' Value types are always copied.

   Public Function Clone() As Object Implements System.ICloneable.Clone
      Return Me.MemberwiseClone()
   End Function
End Class

Public Class Foo : Implements ICloneable
   Public Bar As New Bar ' Referenced objects are not copied.

   Public Function Clone() As Object Implements System.ICloneable.Clone
      Dim copy As Foo = DirectCast(Me.MemberwiseClone(), Foo)
      copy.Bar = DirectCast(Me.Bar.Clone(), Bar) ' Clone member object too.
      Return copy
   End Function
End Class

GeneralRe: To clone an object Pin
irapov21-Nov-05 2:53
irapov21-Nov-05 2:53 
QuestionLaunch HTML document using VB.net Pin
Civic0618-Nov-05 7:10
Civic0618-Nov-05 7:10 
AnswerRe: Launch HTML document using VB.net Pin
Michael Cochrane18-Nov-05 23:06
Michael Cochrane18-Nov-05 23:06 
QuestionDLL Function Noobie Pin
tadieckmann18-Nov-05 6:00
tadieckmann18-Nov-05 6:00 
AnswerRe: DLL Function Noobie Pin
Dave Kreskowiak18-Nov-05 6:37
mveDave Kreskowiak18-Nov-05 6:37 
Questionhow can we dial server database from client application Pin
sheerprogrammer18-Nov-05 5:29
sheerprogrammer18-Nov-05 5:29 
QuestionIm new to use vb.net.... Pin
y_mmohd18-Nov-05 3:28
y_mmohd18-Nov-05 3:28 
AnswerRe: Im new to use vb.net.... Pin
Steve Pullan18-Nov-05 14:54
Steve Pullan18-Nov-05 14:54 
Questionremoving connection completely to SQL Server 2000. Pin
haggisns18-Nov-05 3:27
haggisns18-Nov-05 3:27 
AnswerRe: removing connection completely to SQL Server 2000. Pin
BambooMoon18-Nov-05 3:46
BambooMoon18-Nov-05 3:46 
GeneralRe: removing connection completely to SQL Server 2000. Pin
haggisns18-Nov-05 4:18
haggisns18-Nov-05 4:18 
QuestionHow to read binary from SQL Sever 2000? Pin
dyh222218-Nov-05 2:28
dyh222218-Nov-05 2:28 
QuestionForce domain user to logoff. Pin
y_mmohd18-Nov-05 1:13
y_mmohd18-Nov-05 1:13 
AnswerRe: Force domain user to logoff. Pin
Dave Kreskowiak18-Nov-05 6:27
mveDave Kreskowiak18-Nov-05 6:27 
QuestionCAN ANYBODY TELL ME THAT HOW TO USE FLEXI OR TDB GRID WITH DATASET Pin
ajay bharti17-Nov-05 20:43
ajay bharti17-Nov-05 20:43 
AnswerRe: CAN ANYBODY TELL ME THAT HOW TO USE FLEXI OR TDB GRID WITH DATASET Pin
Suelinda_W23-Nov-05 9:55
Suelinda_W23-Nov-05 9:55 
QuestionDesktop Docking Pin
jasonbullard17-Nov-05 15:32
jasonbullard17-Nov-05 15:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.