Click here to Skip to main content
15,921,694 members
Home / Discussions / C#
   

C#

 
GeneralRe: WriteFile equivalent in C# Pin
Member 1206160028-Sep-15 20:28
Member 1206160028-Sep-15 20:28 
GeneralRe: WriteFile equivalent in C# Pin
Eddy Vluggen28-Sep-15 5:50
professionalEddy Vluggen28-Sep-15 5:50 
GeneralRe: WriteFile equivalent in C# Pin
Member 1206160028-Sep-15 6:05
Member 1206160028-Sep-15 6:05 
GeneralRe: WriteFile equivalent in C# Pin
Eddy Vluggen28-Sep-15 13:24
professionalEddy Vluggen28-Sep-15 13:24 
GeneralRe: WriteFile equivalent in C# Pin
Member 1206160028-Sep-15 20:26
Member 1206160028-Sep-15 20:26 
GeneralRe: WriteFile equivalent in C# Pin
Member 1206160028-Sep-15 6:30
Member 1206160028-Sep-15 6:30 
GeneralRe: WriteFile equivalent in C# Pin
Eddy Vluggen29-Sep-15 1:22
professionalEddy Vluggen29-Sep-15 1:22 
GeneralRe: WriteFile equivalent in C# Pin
Member 1206160029-Sep-15 1:48
Member 1206160029-Sep-15 1:48 
QuestionHow internet Download manager Works? Pin
aahamdan26-Sep-15 8:05
aahamdan26-Sep-15 8:05 
AnswerRe: How internet Download manager Works? PinPopular
BillWoodruff26-Sep-15 13:21
professionalBillWoodruff26-Sep-15 13:21 
GeneralRe: How internet Download manager Works? Pin
aahamdan13-Mar-16 4:19
aahamdan13-Mar-16 4:19 
AnswerRe: How internet Download manager Works? Pin
Afzaal Ahmad Zeeshan27-Sep-15 0:54
professionalAfzaal Ahmad Zeeshan27-Sep-15 0:54 
QuestionCopare two different dataGridView Pin
Member 1121917124-Sep-15 23:04
Member 1121917124-Sep-15 23:04 
AnswerRe: Copare two different dataGridView Pin
OriginalGriff24-Sep-15 23:25
mveOriginalGriff24-Sep-15 23:25 
AnswerRe: Copare two different dataGridView Pin
J. Calhoun25-Sep-15 3:11
J. Calhoun25-Sep-15 3:11 
AnswerRe: Copare two different dataGridView Pin
Gerry Schmitz25-Sep-15 8:20
mveGerry Schmitz25-Sep-15 8:20 
QuestionHow to implement Apriori using C# am new to C# Pin
Member 1199820924-Sep-15 21:13
Member 1199820924-Sep-15 21:13 
AnswerRe: How to implement Apriori using C# am new to C# Pin
Garth J Lancaster24-Sep-15 21:35
professionalGarth J Lancaster24-Sep-15 21:35 
Questiondebugging strategy ? Linq query mis-match using de-serialized complex class Pin
BillWoodruff24-Sep-15 12:53
professionalBillWoodruff24-Sep-15 12:53 
AnswerRe: debugging strategy ? Linq query mis-match using de-serialized complex class Pin
Gerry Schmitz24-Sep-15 18:30
mveGerry Schmitz24-Sep-15 18:30 
GeneralRe: debugging strategy ? Linq query mis-match using de-serialized complex class Pin
BillWoodruff24-Sep-15 22:20
professionalBillWoodruff24-Sep-15 22:20 
GeneralRe: debugging strategy ? Linq query mis-match using de-serialized complex class Pin
Gerry Schmitz25-Sep-15 8:28
mveGerry Schmitz25-Sep-15 8:28 
GeneralRe: debugging strategy ? Linq query mis-match using de-serialized complex class Pin
Kenneth Haugland25-Sep-15 19:36
mvaKenneth Haugland25-Sep-15 19:36 
I'm kind of curious here. When are you interested in calling a clone to get a shallow copy? Id just create a pointer instead then, wouldn't you?

In making a deep copy always end up doing this:
Class MyClasss
    Implements ICloneable

    Private pName As String
    Public Property Name() As String
        Get
            Return pName
        End Get
        Set(ByVal value As String)
            pName = value
        End Set
    End Property

    Private pNAmes As New List(Of String)
    Public Property Names() As List(Of String)
        Get
            Return pNAmes
        End Get
        Set(ByVal value As List(Of String))
            pNAmes = value
        End Set
    End Property

    Public Function Clone() As Object Implements ICloneable.Clone

        Dim result As New MyClasss
        result = Me.MemberwiseClone

        ' If I have any properties of collection type
        ' I need to create a copy of each list 
        Dim TempNames As New List(Of String)
        For Each str As String In Names
            TempNames.Add(str)
        Next

        result.Names = TempNames
        Return result

    End Function
End Class

But I would sure like to know why the MemberwiseClone can't clone lists or collections like this. I also bet there is a more generic way of implementing it though.
GeneralRe: debugging strategy ? Linq query mis-match using de-serialized complex class Pin
BillWoodruff26-Sep-15 1:11
professionalBillWoodruff26-Sep-15 1:11 
GeneralRe: debugging strategy ? Linq query mis-match using de-serialized complex class Pin
Gerry Schmitz28-Sep-15 6:15
mveGerry Schmitz28-Sep-15 6:15 

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.