Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
AnswerRe: 3 Dimensional Array C# Pin
Eddy Vluggen9-Jan-15 12:37
professionalEddy Vluggen9-Jan-15 12:37 
GeneralRe: 3 Dimensional Array C# Pin
Member 1136421710-Jan-15 6:51
Member 1136421710-Jan-15 6:51 
AnswerRe: 3 Dimensional Array C# Pin
BillWoodruff9-Jan-15 14:05
professionalBillWoodruff9-Jan-15 14:05 
GeneralRe: 3 Dimensional Array C# Pin
Member 1136421710-Jan-15 6:41
Member 1136421710-Jan-15 6:41 
GeneralRe: 3 Dimensional Array C# Pin
BillWoodruff10-Jan-15 8:19
professionalBillWoodruff10-Jan-15 8:19 
GeneralRe: 3 Dimensional Array C# Pin
Member 1136421711-Jan-15 16:10
Member 1136421711-Jan-15 16:10 
SuggestionRe: 3 Dimensional Array C# Pin
Richard Deeming12-Jan-15 2:03
mveRichard Deeming12-Jan-15 2:03 
AnswerRe: 3 Dimensional Array C# Pin
OriginalGriff9-Jan-15 22:45
mveOriginalGriff9-Jan-15 22:45 
When you declare a three dimensional array, you are saying that each row, column and zaxis-whatever-it-is-called is the same size:
C#
object[,,] ar3d = new object[2,3,4];
But that isn't necessarily the case with the code you show - we have no guarantee that each of the 2D arrays loaded into Normali is the same each time. And if we aren't sure, nor is the compiler!
So when you try to assign a new 2D array to a row, it complains because a 3D array is not made up of arrays of references to arrays of references to objects - it is in fact a flat linear space of objects which is interpreted as a 3D array.

Probably, what you are trying to do is construct a jagged array:
C#
object[][,] normW = new object[3][,];
for (int i = 0; i < normW.Length; i++)
    {
    object[,] normali = MyProcess(i);
    normW[i] = normali;
    }
Where it doesn't matter what the dimensions of the array you generate in your processing are.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

GeneralRe: 3 Dimensional Array C# Pin
Member 1136421710-Jan-15 6:34
Member 1136421710-Jan-15 6:34 
GeneralRe: 3 Dimensional Array C# Pin
PIEBALDconsult10-Jan-15 7:10
mvePIEBALDconsult10-Jan-15 7:10 
QuestionRegistryKey showing Object reference not set to an instance of an object Pin
Jassim Rahma9-Jan-15 10:06
Jassim Rahma9-Jan-15 10:06 
AnswerRe: RegistryKey showing Object reference not set to an instance of an object Pin
Jassim Rahma9-Jan-15 11:50
Jassim Rahma9-Jan-15 11:50 
QuestionPlay a video Pin
AlecJames9-Jan-15 8:50
AlecJames9-Jan-15 8:50 
QuestionHaving issues with a action looping Pin
Member 113620598-Jan-15 7:12
Member 113620598-Jan-15 7:12 
AnswerRe: Having issues with a action looping Pin
Pete O'Hanlon8-Jan-15 7:26
mvePete O'Hanlon8-Jan-15 7:26 
GeneralRe: Having issues with a action looping Pin
Member 113620598-Jan-15 7:48
Member 113620598-Jan-15 7:48 
GeneralRe: Having issues with a action looping Pin
Pete O'Hanlon8-Jan-15 9:11
mvePete O'Hanlon8-Jan-15 9:11 
GeneralRe: Having issues with a action looping Pin
Member 113620598-Jan-15 9:49
Member 113620598-Jan-15 9:49 
AnswerRe: Having issues with a action looping Pin
BillWoodruff8-Jan-15 8:37
professionalBillWoodruff8-Jan-15 8:37 
GeneralRe: Having issues with a action looping Pin
Member 113620598-Jan-15 9:50
Member 113620598-Jan-15 9:50 
QuestionConvert from Base 64 to hexadecimal value Pin
NJdotnetdev8-Jan-15 7:10
NJdotnetdev8-Jan-15 7:10 
AnswerRe: Convert from Base 64 to hexadecimal value Pin
SledgeHammer018-Jan-15 7:25
SledgeHammer018-Jan-15 7:25 
GeneralRe: Convert from Base 64 to hexadecimal value Pin
NJdotnetdev8-Jan-15 7:32
NJdotnetdev8-Jan-15 7:32 
AnswerRe: Convert from Base 64 to hexadecimal value Pin
PIEBALDconsult8-Jan-15 7:32
mvePIEBALDconsult8-Jan-15 7:32 
GeneralRe: Convert from Base 64 to hexadecimal value Pin
NJdotnetdev8-Jan-15 7:34
NJdotnetdev8-Jan-15 7:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.