Click here to Skip to main content
15,892,809 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Validate data in a table Pin
phokojoe7-May-06 1:32
phokojoe7-May-06 1:32 
GeneralRe: Validate data in a table Pin
phokojoe9-May-06 22:47
phokojoe9-May-06 22:47 
QuestionReading from notepad File Pin
Mr kilany6-May-06 3:08
Mr kilany6-May-06 3:08 
AnswerRe: Reading from notepad File Pin
Colin Angus Mackay6-May-06 3:15
Colin Angus Mackay6-May-06 3:15 
AnswerRe: Reading from notepad File Pin
kkppttoo7-May-06 0:49
kkppttoo7-May-06 0:49 
Questiondouble rows Pin
microuser_20006-May-06 2:03
microuser_20006-May-06 2:03 
QuestionCopy Objects - Am I missing something? Pin
Kaditcher6-May-06 1:07
Kaditcher6-May-06 1:07 
AnswerRe: Copy Objects - Am I missing something? Pin
Joshua Quick6-May-06 9:39
Joshua Quick6-May-06 9:39 
You copy objects in .NET by "cloning" them. You can make your classes cloneable by implementing the ICloneable[^] interface.

A shallow copy is easy and can be done in 1 line. You just need to call the Object.MemberwiseClone()[^] method. All objects have this method.
Public Class Foo : Implements ICloneable
   Public Function Clone() As Object Implements System.ICloneable.Clone
      Return Me.MemberwiseClone
   End Function
End Class

If you need to do a deep copy, then you need to explicitly create new objects within the above Clone() method and assign them to the clone's member variables.
GeneralRe: Copy Objects - Am I missing something? Pin
Kaditcher9-May-06 7:24
Kaditcher9-May-06 7:24 
GeneralRe: Copy Objects - Am I missing something? Pin
Joshua Quick9-May-06 17:14
Joshua Quick9-May-06 17:14 
Questionselecting control at runtime (VB.NET) Pin
A M SOMAN6-May-06 0:55
A M SOMAN6-May-06 0:55 
QuestionPrinter Object in VB Pin
cberam6-May-06 0:01
cberam6-May-06 0:01 
AnswerRe: Printer Object in VB Pin
Duncan Edwards Jones8-May-06 3:23
professionalDuncan Edwards Jones8-May-06 3:23 
QuestionDSN File Change at run time Pin
prashantvashisht5-May-06 23:22
prashantvashisht5-May-06 23:22 
QuestionDisable Guest Account in VB Pin
QuickDeveloper5-May-06 23:07
QuickDeveloper5-May-06 23:07 
QuestionDatagrid Pin
militiaware5-May-06 21:33
militiaware5-May-06 21:33 
AnswerRe: Datagrid Pin
nesNYC7-May-06 20:07
nesNYC7-May-06 20:07 
GeneralRe: Datagrid Pin
militiaware7-May-06 23:29
militiaware7-May-06 23:29 
GeneralRe: Datagrid Pin
nesNYC8-May-06 5:11
nesNYC8-May-06 5:11 
QuestionProcess cpu usage of wmiprsve is 99% when getting processes Pin
MohammadAmiry5-May-06 20:53
MohammadAmiry5-May-06 20:53 
QuestionDatagrid Pin
militiaware5-May-06 20:52
militiaware5-May-06 20:52 
AnswerRe: Datagrid Pin
User 17164928-May-06 5:33
professionalUser 17164928-May-06 5:33 
GeneralRe: Datagrid Pin
militiaware9-May-06 21:13
militiaware9-May-06 21:13 
QuestionWeb Application related query Pin
Vijaya Krishnamoorthy5-May-06 19:54
Vijaya Krishnamoorthy5-May-06 19:54 
AnswerRe: Web Application related query Pin
Guffa5-May-06 23:35
Guffa5-May-06 23:35 

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.