Buy Questpond's video subscriptions on
huge discount
.
Online: 2218
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Forums
>
C#
>
Loading ...
What is difference between clone and copyTo method?
Posted by
Kumarkrishna184
under
C#
on 3/23/2018 |
Points: 10
| Views : 2213 | Status :
[Member]
| Replies : 3
Write New Post
|
Search Forums
|
Resolved Posts
|
Un Answered Posts
|
Forums Home
What is difference between clone and copyTo method?
Thanks and Regards,
Krishna Kumar
Reply
|
Reply with Attachment
Alert Moderator
Responses
Posted by:
Vedikaledange
on: 1/4/2019
[Member]
Starter
|
Points: 25
0
The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo() method copies the elements into another existing array. Both perform a shallow copy. A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array. A deep copy would create a new instance of each element's object, resulting in a different, yet identacle object.
DOT NET
Kumarkrishna184
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Siddhipatel
on: 1/28/2020
[Member]
Starter
|
Points: 25
0
-->The
Clone()
method returns a new array object containing all the elements in the original array.
-->The
CopyTo()
method copies the elements into another existing array.
Software Developer at iFour Technolab Pvt Ltd
Kumarkrishna184
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Ishan7
on: 11/18/2020
[Member]
Starter
|
Points: 25
0
The clone is of the same type as the original Array.
The CopyTo() method copies the elements into another existing array. It copies the elements of one array to another pre-existing array starting from a given index (usually 0).
Both perform a shallow copy.
http://net-informations.com/faq/priq/clone.htm#:~:text=Clone()%20Vs%20CopyTo()%20Array&text=The%20clone%20is%20of%20the,Both%20perform%20a%20shallow%20copy%20.
Kumarkrishna184
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Login to post response
Latest Posts
How to get the exact property name while getting error
(0)
PDB file is not showing Line Number in dot net application hosted on server
(0)
Both Strings morethan 5 letters in length end of the words one vowel and one consonent is different
(0)
how to check Any adjacent letters transposed between two strings(ex: JOHN, JHON)
(1)
can't receive data after success login ?
(1)
Implement Multi-Tenant in Azure Logic Apps
(0)
Why ASP.Net Core 7.0 Web API showing as Connection refused?
(0)
Iterating over columns of dataframe and print as rows in Python Django
(0)
More ...