ayse

ayse

  • NA
  • 1
  • 0

first_array[].second_array[].x1 is it possible?

Mar 19 2009 5:42 PM
I try to define records like delphi as below:

first_array:array[1..800]of record
Y1,Y2:integer;
X1,X2:integer;
harfsayisi:integer;
second_array:array[0..255]of record
Y1,Y2:integer;
X1,X2:integer;

can i define this record with c#?

for example;

public struct MyType
    {
        public int X;
        public int Y;
     
    }
MyType[] first_array= new MyType[80];

public MyType[] GetData
        {
            get
            {
                return first_array;
            }          
        }
public void MyMethod()
        {
           

           first_array[0].Y = 0;
     }

I can do first_array[0].Y     but i also want to do     first_array[0].second_array[0].Y   

is it possible?


Answers (1)