473,386 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Accessing members of an Array of Objects using GetValue

MXL
Hello,

I have 2 classes: MyClass1 and MyClass2.
MyClass1 contains an Array(3 elements) of MyClass2, which contains an array
of bytes(3 elements).

__gc public class MyClass2
{
public:
Array* arry2;
MyClass2()
{
arry2 = Array::CreateInstance( __typeof(unsigned char), 3);
}
}

__gc public class MyClass1
{
public:
Array* arry1;
MyClass1()
{
arry1 = Array::CreateInstance( __typeof(MyClass2), 3);
}
}
I would like to access the array of byes:

MyClass1* mC = new MyClass1;
mC->arry1->GetValue(0)->arry2->GetValue(0) //Results in build error
The compiler does not allow me to do this:
error C2039: 'arry2' : is not a member of 'System::Object'

I recognize that GetValue(int index) returns Object* and does not have an
'arry2' member at compile-time,
but what can I do to access arry2?
Thank you.
Nov 17 '05 #1
0 1083

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

Similar topics

2
by: red | last post by:
If I use PEAR to produce an accociative array from a mysql table, and display the array with print_r, it says it is an array and it displays values like a regular array: Array ( => 1 =>...
8
by: [RaZoR] | last post by:
hello, main script creates IE window, put an array there and then calls a child script. chils script makes an array element equal to some object and returns control to main script. then main...
38
by: VK | last post by:
Hello, In my object I have getDirectory() method which returns 2-dimentional array (or an imitation of 2-dimentional array using two JavaScript objects with auto-handled length property - please...
8
by: Sorin Sandu | last post by:
Is it posible to modify the lenghth of an array ? I want to do something like int i = 0; string debit = new string; string credit = new string; while (myread3.Read())
16
by: Crirus | last post by:
I have a class. I need to write a routine in this class, that loop through it's members (in a instance of the class) and concatenate all members values as string. I need to filter does members...
4
by: dani k | last post by:
How do I write my own serialization of a class that has non-serializable data members? this problem arose when I tried to serialize RSAParameters, for which the private stuff is not serializable
2
by: Paul | last post by:
Hi all, I've written a custom DAL for a web app i'm currently working on, and I am trying to make it as efficient as possible- where possible. Objects are populated on creation using the DAL,...
5
by: Paul Brettschneider | last post by:
Hello, I have a global static array of structs and want to access a given element using an identifier. I don't want to use the element subscript, because it will change if I insert elements...
3
by: mrsouthg | last post by:
Hi, I am fairly new to c# .net language and have been using a set of code I was given to learn from. I have found a suitable part which I would like to change, I am however finding it a big hurdle...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.