Click here to Skip to main content
15,900,589 members
Home / Discussions / C#
   

C#

 
QuestionPartial class: is this a bug? Pin
Septimus Hedgehog2-Mar-13 6:52
Septimus Hedgehog2-Mar-13 6:52 
AnswerRe: Partial class: is this a bug? Pin
DaveyM692-Mar-13 7:56
professionalDaveyM692-Mar-13 7:56 
AnswerRe: Partial class: is this a bug? Pin
Dave Kreskowiak2-Mar-13 8:24
mveDave Kreskowiak2-Mar-13 8:24 
GeneralRe: Partial class: is this a bug? Pin
Septimus Hedgehog2-Mar-13 9:34
Septimus Hedgehog2-Mar-13 9:34 
AnswerRe: Partial class: is this a bug? PinPopular
Alan N2-Mar-13 11:19
Alan N2-Mar-13 11:19 
GeneralRe: Partial class: is this a bug? Pin
Septimus Hedgehog3-Mar-13 7:49
Septimus Hedgehog3-Mar-13 7:49 
GeneralRe: Partial class: is this a bug? Pin
Septimus Hedgehog6-Mar-13 5:53
Septimus Hedgehog6-Mar-13 5:53 
Questioneven numbers table Pin
Yrtsg1-Mar-13 22:11
Yrtsg1-Mar-13 22:11 
AnswerRe: even numbers table PinPopular
harold aptroot1-Mar-13 23:29
harold aptroot1-Mar-13 23:29 
QuestionC# Console.ReadLine runns out of memory Pin
dcof1-Mar-13 8:45
dcof1-Mar-13 8:45 
AnswerRe: C# Console.ReadLine runns out of memory Pin
Jibesh1-Mar-13 9:13
professionalJibesh1-Mar-13 9:13 
AnswerRe: C# Console.ReadLine runns out of memory Pin
OriginalGriff1-Mar-13 21:59
mveOriginalGriff1-Mar-13 21:59 
GeneralRe: C# Console.ReadLine runns out of memory Pin
dcof2-Mar-13 8:07
dcof2-Mar-13 8:07 
GeneralRe: C# Console.ReadLine runns out of memory Pin
jschell2-Mar-13 10:26
jschell2-Mar-13 10:26 
GeneralRe: C# Console.ReadLine runns out of memory Pin
dcof2-Mar-13 11:26
dcof2-Mar-13 11:26 
GeneralRe: C# Console.ReadLine runns out of memory Pin
jschell3-Mar-13 5:54
jschell3-Mar-13 5:54 
QuestionTrying to use child class method by overriding parent Pin
MichCl1-Mar-13 8:26
MichCl1-Mar-13 8:26 
AnswerRe: Trying to use child class method by overriding parent Pin
OriginalGriff1-Mar-13 8:41
mveOriginalGriff1-Mar-13 8:41 
GeneralRe: Trying to use child class method by overriding parent; using Reflection to invoke class etc Pin
MichCl1-Mar-13 9:30
MichCl1-Mar-13 9:30 
GeneralRe: Trying to use child class method by overriding parent; using Reflection to invoke class etc Pin
jschell2-Mar-13 10:30
jschell2-Mar-13 10:30 
GeneralRe: Trying to use child class method by overriding parent; using Reflection to invoke class etc Pin
MichCl5-Mar-13 2:23
MichCl5-Mar-13 2:23 
GeneralRe: Trying to use child class method by overriding parent; using Reflection to invoke class etc Pin
MichCl5-Mar-13 9:40
MichCl5-Mar-13 9:40 
QuestionPassing parameters from unmanaged code to managed code by reference Pin
JimmyRopes1-Mar-13 5:42
professionalJimmyRopes1-Mar-13 5:42 
Is it possible to pass parameters from unmanaged code to managed code by reference?

I am programming agents for the Metta Trader 4 (MT4) platform using MetaQuotes Language 4 (MQL4); a C like language.

Normally one would use C++ to generate DLLs but I would like to use C# if I could because when you release something in C++ it is frozen in time as opposed to when you release something in C#. With C# if problems are detected in the underlieing classes they are corrected by normal updates of the .NET platform. This is an advantage I would like to take advantage of to simplify maintenance of products I hope to sell.

I will need to pass large arrays of market data to these DLLs for analysis and would like to do this by reference.

Here is an example of how to pass an array by value:

C#
[DllExport(EntryPoint = "SumIntegerArray")]
       public static int Sum([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)]int[] values, int count)
       {
           int result = 0;

           for (int i = 0; i < count; i++)
               result += values[i];

           return result;
       }

How would I pass the array by reference to the DLL?

The report of my death was an exaggeration - Mark Twain

Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems

I'm on-line therefore I am.
JimmyRopes



GeneralRe: Passing parameters from unmanaged code to managed code by reference Pin
harold aptroot1-Mar-13 7:13
harold aptroot1-Mar-13 7:13 
GeneralRe: Passing parameters from unmanaged code to managed code by reference Pin
JimmyRopes1-Mar-13 7:39
professionalJimmyRopes1-Mar-13 7:39 

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.