offset in array
-
Hi, I would like to know how can I refer to array such as byte array with offset such as I would like to use the array from spesific location till the array end in c++ i would do somthing like that char *samplesBuffer int offset = 20; funcName(samplesBuffer+offset) how can I do int in c# thanks ronen
-
Hi, I would like to know how can I refer to array such as byte array with offset such as I would like to use the array from spesific location till the array end in c++ i would do somthing like that char *samplesBuffer int offset = 20; funcName(samplesBuffer+offset) how can I do int in c# thanks ronen
You can't. C# doesn't support that sort of pointer arithmetic. You'd have to pass in the starting index instead. The good news is, the array knows it's length, in C++ you'd still have to pass in a length so you knew how far you could go in it
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
You can't. C# doesn't support that sort of pointer arithmetic. You'd have to pass in the starting index instead. The good news is, the array knows it's length, in C++ you'd still have to pass in a length so you knew how far you could go in it
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.