473,799 Members | 2,741 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Array.Copy method

Is the Array.Copy Method only limited to copying one
dimensional arrays? If this is not the case, what is the
syntax to copy multi-dimensional arrays with this method?
Nov 20 '05 #1
4 3318
Yes, it is only supported for one dimensional arrays.

Regards - OHM
Gidon Sela wrote:
Is the Array.Copy Method only limited to copying one
dimensional arrays? If this is not the case, what is the
syntax to copy multi-dimensional arrays with this method?


Regards - OHM# OneHandedMan{at }BTInternet{dot }com
Nov 20 '05 #2
Cor
Hi Gidon,
Is the Array.Copy Method only limited to copying one
dimensional arrays? If this is not the case, what is the
syntax to copy multi-dimensional arrays with this method?


It also exist for the Datatable, but it is not a member of Ilist, and
therefore you have to see for it at each array yourself if and what method
you can use.

Cor
Nov 20 '05 #3
* "Gidon Sela" <an*******@disc ussions.microso ft.com> scripsit:
Is the Array.Copy Method only limited to copying one
dimensional arrays?


Did you read the "Remarks" section here?

<http://msdn.microsoft. com/library/en-us/cpref/html/frlrfsystemarra yclasscopytopic 1.asp>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
Sorry, I was looking at the copyTo.

Dim A1(1, 2) As Integer

Dim A2(1, 2) As Integer

'A1 - Fill

A1(0, 0) = 10

A1(0, 1) = 20

A1.Copy(A1, A2, A1.Length)

Regards - OHM


One Handed Man [ OHM# ] wrote:
Yes, it is only supported for one dimensional arrays.

Regards - OHM
Gidon Sela wrote:
Is the Array.Copy Method only limited to copying one
dimensional arrays? If this is not the case, what is the
syntax to copy multi-dimensional arrays with this method?


Regards - OHM# OneHandedMan{at }BTInternet{dot }com


--
Best Regards - OHM

O_H_M{at}BTInte rnet{dot}com
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

58
10188
by: jr | last post by:
Sorry for this very dumb question, but I've clearly got a long way to go! Can someone please help me pass an array into a function. Here's a starting point. void TheMainFunc() { // Body of code... TCHAR myArray; DoStuff(myArray);
4
2944
by: Lance | last post by:
I have an array of bytes that I need to convert into an array of Integers. But, the number of bits per value in the Byte array is not necessarily divisible by 8 (although it will never exceed 32). For example, lets say I have a an array of bytes (byteValues) that represents a string of 7 bit values. In this case, the first value would be stored in the first 7 bits of byteValues(0), the second value would be stored in the last bit of...
3
2996
by: gregory_may | last post by:
I feel silly for posting such a simple question, but here goes. What is the difference between these statements - Case 3 doesnt work ... why not?: CASE 1 Public Case1 As Byte()
4
1692
by: Cleverbum | last post by:
I have created a class Particle which has a method toString() that prints out all the useful information. In my main program I create an array of these objects and once I've fiddled with them a bit I want to use the toString() method on them all. Is there a way of defining toString() so that I don't have to loop through all of the particles printing each individually. The code might explain it better than I can so the relevant part of...
1
2058
by: illegal.prime | last post by:
I would like to have an array of objects (whose class I define) and then just invoke either: MyClass clonedArray = (MyClass) myArray.Clone(); OR Array.Copy(myArray, clonedArray, myArray.Length); and have an array of cloned objects (i.e. the new array of objects aren't the objects contained in my original array). But instead it seems necessary for me to have to iterate over my entire array and individually clone each element in the...
14
20414
by: Abhi | last post by:
I wrote a function foo(int arr) and its prototype is declared as foo(int arr); I modify the values of the array in the function and the values are getting modified in the main array which is passed also. I understand that this way of passing the array is by value and if the prototype is declared as foo(int *), it is by reference in which case the value if modified in the function will get reflected in the main function as well. I dont...
29
4257
by: Jon Slaughter | last post by:
Is it safe to remove elements from an array that foreach is working on? (normally this is not the case but not sure in php) If so is there an efficient way to handle it? (I could add the indexes to a temp array and delete afterwards if necessary but since I'm actually working in a nested situation this could get a little messy. I guess I could set there values to null and remove them afterwards? Thanks, Jon
6
5311
by: Soneji | last post by:
This is a pretty specific problem, so I'm not posting the whole program. ( but I can if you really need it ) I have a good understanding of what's wrong, I just can't figure out how to combat it. Basically, I was fooling around with copy constructors, and overloaded assignment operators, and I ran into an array return problem. I made a method to return a character array from a class: class entry {
3
3756
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
One more for today.... As I add more and more lines to my RichTextBox the array that holds its strings gets bigger and bigger and the vertical scroll bar gets smaller and smaller until the string array finally runs out of memory. I'd like to set some line limit and once that limit is reached, start removing the first line each time a new line is appended onto the end. I think this is probably more of an array manipulation question than...
6
72912
by: =?Utf-8?B?U3VzaGlTZWFu?= | last post by:
Hello. How I can copy one byte array to other byte array? For example I have byte array1 = new byte; byte array2 = new byte; in array1 I have useful data from position 55 to 105 and I need copy those bytes to array2 on position from 15 to 65. How to do this? There are should be some function which work like "copy" function in C++.
0
9544
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10490
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10030
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9077
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7570
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4145
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.