Click here to Skip to main content
15,916,019 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# network programming issue Pin
Gary Thom14-Dec-04 7:40
Gary Thom14-Dec-04 7:40 
GeneralRe: C# network programming issue Pin
Opa Knack14-Dec-04 7:59
Opa Knack14-Dec-04 7:59 
GeneralRe: C# network programming issue Pin
Opa Knack14-Dec-04 8:12
Opa Knack14-Dec-04 8:12 
GeneralRe: C# network programming issue Pin
Gary Thom14-Dec-04 8:27
Gary Thom14-Dec-04 8:27 
GeneralDividing array into sub-arrays Pin
SebbaP12-Dec-04 7:39
SebbaP12-Dec-04 7:39 
GeneralRe: Dividing array into sub-arrays Pin
Dennis C. Dietrich12-Dec-04 10:58
Dennis C. Dietrich12-Dec-04 10:58 
GeneralRe: Dividing array into sub-arrays Pin
SebbaP12-Dec-04 11:32
SebbaP12-Dec-04 11:32 
GeneralRe: Dividing array into sub-arrays Pin
Dennis C. Dietrich12-Dec-04 12:15
Dennis C. Dietrich12-Dec-04 12:15 
SebbaP wrote:
I cannot (or rather, would not like to) change the method signature, and as you mentioned, copying each element is slow. But that is what I have settled for (I would end up copying each element in the partitioned byte[] anyway inside Foo), until I - or someone else for that matter - comes up with a quicker solution.

Copying is slower but that does not necessarily mean that it's too slow for you. Although I'd still suggest that you should consider refactoring the method you want to call, you should give Array.Copy() a try. Somehow I doubt that it copies each element. I would rather expect a simple memcopy which should not get you into trouble unless you want to copy a few gigabytes per second. If you take a look at how Array.Copy() works you'll find out that it is implemented directly in the CLR. The method is overloaded however it always results in a call of the following method:
[MethodImpl(MethodImplOptions.InternalCall),
 ReliabilityContract(Consistency.MayCorruptInstance, CER.MayFail)]
internal static extern void Copy(Array sourceArray, int sourceIndex,
                                 Array destinationArray, int destinationIndex,
                                 int length, bool reliable);

Best regards
Dennis
GeneralRe: Dividing array into sub-arrays Pin
leppie12-Dec-04 12:41
leppie12-Dec-04 12:41 
General401 Unauthorized error GetResponse Pin
Anand Mudliar12-Dec-04 7:01
Anand Mudliar12-Dec-04 7:01 
QuestionHow to call a MouseEvent from a KeyBoard Event Pin
manivannan.p12-Dec-04 6:24
manivannan.p12-Dec-04 6:24 
Generalfatal execution engine error Pin
sharonz12-Dec-04 5:16
sharonz12-Dec-04 5:16 
GeneralSimulating Ctrl+c Pin
Paladin5912-Dec-04 4:47
Paladin5912-Dec-04 4:47 
GeneralRe: Simulating Ctrl+c Pin
Hmitosh12-Dec-04 21:12
Hmitosh12-Dec-04 21:12 
GeneralRe: Simulating Ctrl+c Pin
Paladin5913-Dec-04 20:04
Paladin5913-Dec-04 20:04 
GeneralFollowup: CLR Hosting startup time Pin
Uwe Keim11-Dec-04 23:44
sitebuilderUwe Keim11-Dec-04 23:44 
GeneralMicrosoft Winform Pin
Ray Hurst11-Dec-04 22:43
Ray Hurst11-Dec-04 22:43 
GeneralRe: Microsoft Winform Pin
leppie12-Dec-04 0:39
leppie12-Dec-04 0:39 
GeneralStrange Problem Pin
Moon Boy11-Dec-04 8:49
Moon Boy11-Dec-04 8:49 
GeneralRe: Strange Problem Pin
leppie11-Dec-04 21:00
leppie11-Dec-04 21:00 
GeneralRe: Strange Problem Pin
Anonymous13-Dec-04 6:03
Anonymous13-Dec-04 6:03 
GeneralGetting rid of unwished Systemsounds Pin
Hmitosh11-Dec-04 6:36
Hmitosh11-Dec-04 6:36 
GeneralRe: Getting rid of unwished Systemsounds Pin
Daniel Turini11-Dec-04 21:22
Daniel Turini11-Dec-04 21:22 
GeneralRe: Getting rid of unwished Systemsounds Pin
Skynyrd12-Dec-04 9:30
Skynyrd12-Dec-04 9:30 
GeneralRe: Getting rid of unwished Systemsounds Pin
Hmitosh13-Dec-04 5:09
Hmitosh13-Dec-04 5:09 

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.