Re: How can I convert 2D array to 1D array
From: Emad Barsoum (e_barsoum_at_hotmail.com)
Date: 03/20/04
- Next message: Earl Teigrob: "Testing SqlDataType for null when exact type unknow until runtime"
- Previous message: Willy Denoyette [MVP]: "Re: Jet and .NET"
- In reply to: Tonyukuk: "How can I convert 2D array to 1D array"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 20 Mar 2004 08:28:48 -0800
Hi,
To convert 2D to 1D:
for(int i=0;i<2;i++)
for(int j=0;j<2;j++)
{
one[j + i*2] = array[i,j];
}
Regards,
Emad
"Tonyukuk" <bilgetonyukuk@hotmail-dot-com.no-spam.invalid> wrote in message
news:405c11f6_2@Usenet.com...
> For example I have an 2D array.
> int [,] array=new int[2,2];
> and I can convert it into one[4]
> how can I do that ?
>
>
> Posted Via Usenet.com Premium Usenet Newsgroup Services
> ----------------------------------------------------------
> ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
> ----------------------------------------------------------
> http://www.usenet.com
- Next message: Earl Teigrob: "Testing SqlDataType for null when exact type unknow until runtime"
- Previous message: Willy Denoyette [MVP]: "Re: Jet and .NET"
- In reply to: Tonyukuk: "How can I convert 2D array to 1D array"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|