O
Ole
Goodday everybody,
i want to create an array that represents data, that has to
be transferred to a pdf doc ( iTextSharp ).
The problem is, that i seem too loose my faith. Namely, ( i have
experiences in
c/c++, perl and i thouht in c#, too ), i do not succeed in creating a
multidimensional array. I have no experience in creating
multidimensional array in c#. The whole process looks so ugly to me,
that i really
think of throwing all that c# and java stuff against the wind in order
to
use good old c or c++ again.
Or, ... perhaps i'm too stupid.
So, if some programmer out there would like to draw another, deep
fallen programmer out of his depressions, what is wrong with the
following code: (???!!!)
using System;
namespace arraytest {
class Class1 {
[STAThread]
static void Main( string[] args ) {
// shouldn't the following statement create an 3-dimensional array
?
Array numbers = Array.CreateInstance( typeof ( Int32 ), 10, 4, 2
);
// and why isn't possible simply to do :
// numbers[][][] = new int[10][4][2] ?!
try {
for( int i = 0; i < 10; i++ ) {
for ( int y = 0; y < 4; i++ ) {
for( int j = 0; j < 2; j++ ) {
// please do not answer : "why do you not do
numbers.initialize ( )
// wordless!
numbers.SetValue( 100, i,y,j );
}
}
}
}catch ( Exception e ) {
System.Console.WriteLine( e.ToString ( ) );
System.Console.Read( );
}
}
}
}
Sure, i could create a row - class, that would be able to hold the
data and
put those row objects into an array. But i don't want't to
overobjectize
my clients' workstations!!
Please help me out here ...!
Thanks in advance, Ole.
PS ( to all the java programmers : how do you manage array
complications like this ? I saw something similar ugly in java . )
if ( noone.HelpsMe( ) ) {
throw new Languages ( "into the sea" );
}else {
put the System.Out && and goto bed;
}
bed:
i want to create an array that represents data, that has to
be transferred to a pdf doc ( iTextSharp ).
The problem is, that i seem too loose my faith. Namely, ( i have
experiences in
c/c++, perl and i thouht in c#, too ), i do not succeed in creating a
multidimensional array. I have no experience in creating
multidimensional array in c#. The whole process looks so ugly to me,
that i really
think of throwing all that c# and java stuff against the wind in order
to
use good old c or c++ again.
Or, ... perhaps i'm too stupid.
So, if some programmer out there would like to draw another, deep
fallen programmer out of his depressions, what is wrong with the
following code: (???!!!)
using System;
namespace arraytest {
class Class1 {
[STAThread]
static void Main( string[] args ) {
// shouldn't the following statement create an 3-dimensional array
?
Array numbers = Array.CreateInstance( typeof ( Int32 ), 10, 4, 2
);
// and why isn't possible simply to do :
// numbers[][][] = new int[10][4][2] ?!
try {
for( int i = 0; i < 10; i++ ) {
for ( int y = 0; y < 4; i++ ) {
for( int j = 0; j < 2; j++ ) {
// please do not answer : "why do you not do
numbers.initialize ( )
// wordless!
numbers.SetValue( 100, i,y,j );
}
}
}
}catch ( Exception e ) {
System.Console.WriteLine( e.ToString ( ) );
System.Console.Read( );
}
}
}
}
Sure, i could create a row - class, that would be able to hold the
data and
put those row objects into an array. But i don't want't to
overobjectize
my clients' workstations!!
Please help me out here ...!
Thanks in advance, Ole.
PS ( to all the java programmers : how do you manage array
complications like this ? I saw something similar ugly in java . )
if ( noone.HelpsMe( ) ) {
throw new Languages ( "into the sea" );
}else {
put the System.Out && and goto bed;
}
bed: