Jagged arrays in MC++
-
I have a managed class and I want to declare a jagged array of doubles as a member. How do I declare this and how do I initialize it? I can do that in C#, but I have syntax problems when it comes to
__gc
stuff :) Thanks! Best regards, Alexandru Savescu P.S. Interested in art? Visit this! -
I have a managed class and I want to declare a jagged array of doubles as a member. How do I declare this and how do I initialize it? I can do that in C#, but I have syntax problems when it comes to
__gc
stuff :) Thanks! Best regards, Alexandru Savescu P.S. Interested in art? Visit this! -
I have a managed class and I want to declare a jagged array of doubles as a member. How do I declare this and how do I initialize it? I can do that in C#, but I have syntax problems when it comes to
__gc
stuff :) Thanks! Best regards, Alexandru Savescu P.S. Interested in art? Visit this!Normally you use Array::CreateInstance() method to create the jagged array.
using namespace System;
using namespace System::Collections;public __gc class Test
{
Test()
{
Int32 lowerBounds[] = {200};
Int32 lengths[] = {10};\_array = Array::CreateInstance(\_\_typeof(Int32), lengths, lowerBounds); }
private:
Array __gc* _array;
};You might wish to give a C# example of what you need if the above does not answer your question. Remember you can assign (cast) Array __gc* to []. Best regards, Paul. Jesus Christ is LOVE! Please tell somebody.