Top "Cloning" questions

Cloning refers to the making of an exact copy (deep copy) of any kind of object.

Creating a copy of an object in C#

Please have a look at the code below (excerpt from a C# book): public class MyClass { public int val; } public …

c# object reference cloning
How to properly override clone method?

I need to implement a deep clone in one of my objects which has no superclass. What is the best …

java clone cloning cloneable
Fastest Way to do Shallow Copy in C#

I wonder what is the fastest way to do shallow copying in C#? I only know there are 2 ways to …

c# cloning shallow-copy
How to fix 'The project you were looking for could not be found' when using git clone

I am trying to clone a project from gitlab to my local machine. I have been granted rights as a …

git gitlab project git-bash cloning
Spring: Create new instance of bean for each call of get method

I have next situation: Connection manager should have each time one object of ConnectionServer and new objects of DataBean So, …

java spring cloning
How to clone a multidimensional array in java?

Edit 2: Below is a code snippet based on DuffyMo's response that illustrates how to get around the limitations of cloning …

java arrays cloning
How to deep copy a class without marking it as Serializable

Given the following class: class A { public List<B> ListB; // etc... } where B is another class that may …

c# deep-copy cloning
How do I get `git clone --recursive` to recreate submodules' remotes and branches?

I have a project with a handful of submodules. Many of them are cloned from a GitHub fork to which …

git git-submodules git-clone cloning git-remote
Git clone Angular Cli project show that you are not in the project

I've been always struggling with angular cli as it keeps giving me the error that I am not in angular …

angular-cli cloning
Is there a much better way to create deep and shallow clones in C#?

I have been creating object for a project and there are some instances that I have to create a deep …

c# .net oop cloning