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

C#

 
GeneralRe: 2d array in c# Pin
Dan Mos26-Feb-10 18:25
Dan Mos26-Feb-10 18:25 
GeneralRe: 2d array in c# Pin
Pete O'Hanlon26-Feb-10 9:44
mvePete O'Hanlon26-Feb-10 9:44 
GeneralRe: 2d array in c# Pin
harold aptroot26-Feb-10 9:53
harold aptroot26-Feb-10 9:53 
GeneralRe: 2d array in c# Pin
Pete O'Hanlon26-Feb-10 10:07
mvePete O'Hanlon26-Feb-10 10:07 
GeneralRe: 2d array in c# Pin
harold aptroot26-Feb-10 10:22
harold aptroot26-Feb-10 10:22 
GeneralRe: 2d array in c# Pin
Pete O'Hanlon26-Feb-10 10:28
mvePete O'Hanlon26-Feb-10 10:28 
AnswerRe: 2d array in c# Pin
harold aptroot26-Feb-10 3:53
harold aptroot26-Feb-10 3:53 
AnswerRe: 2d array in c# Pin
Dave Doknjas26-Feb-10 12:09
Dave Doknjas26-Feb-10 12:09 
The Java rectangular array in your example is a special case in Java since Java only has jagged arrays (arrays of arrays), not multidimensional arrays, but allows a special rectangular jagged array initialization.
The C# equivalent to this is:
[code]//ORIGINAL LINE: private int[][] avtomat = new int[maxState][256];
//JAVA TO VB & C# CONVERTER NOTE: The following call to the 'RectangularArrays' helper class reproduces the rectangular array initialization that is automatic in Java:
private int[][] avtomat = RectangularArrays.ReturnRectangularIntArray(maxState, 256);

//----------------------------------------------------------------------------------------
// Copyright © 2008 - 2010 Tangible Software Solutions Inc.
// This class can be used by anyone provided that the copyright notice remains intact.
//
// This class provides the logic to simulate Java rectangular arrays, which are jagged
// arrays with inner arrays of the same length.
//----------------------------------------------------------------------------------------
internal static class RectangularArrays
{
internal static int[][] ReturnRectangularIntArray(int Size1, int Size2)
{
int[][] Array = new int[Size1][];
for (int Array1 = 0; Array1 < Size1; Array1++)
{
Array[Array1] = new int[Size2];
}
return Array;
}
}[/code]

David Anton
Convert between VB, C#, C++, & Java
www.tangiblesoftwaresolutions.com
Questionsplitting a long string Pin
manustone26-Feb-10 2:53
manustone26-Feb-10 2:53 
AnswerRe: splitting a long string Pin
Keith Barrow26-Feb-10 2:56
professionalKeith Barrow26-Feb-10 2:56 
GeneralRe: splitting a long string Pin
manustone26-Feb-10 4:21
manustone26-Feb-10 4:21 
AnswerRe: splitting a long string Pin
Luc Pattyn26-Feb-10 6:51
sitebuilderLuc Pattyn26-Feb-10 6:51 
AnswerRe: splitting a long string Pin
kevinnicol26-Feb-10 3:03
kevinnicol26-Feb-10 3:03 
GeneralRe: splitting a long string Pin
manustone26-Feb-10 4:18
manustone26-Feb-10 4:18 
GeneralRe: splitting a long string Pin
Luc Pattyn26-Feb-10 9:11
sitebuilderLuc Pattyn26-Feb-10 9:11 
QuestionHow to get assembly meta data to generate Pin
Xpnctoc26-Feb-10 2:22
Xpnctoc26-Feb-10 2:22 
AnswerRe: How to get assembly meta data to generate Pin
Xpnctoc26-Feb-10 3:48
Xpnctoc26-Feb-10 3:48 
QuestionDataTable Compute Method Pin
elizas26-Feb-10 2:00
elizas26-Feb-10 2:00 
Answerand your question is? Pin
Not Active26-Feb-10 2:05
mentorNot Active26-Feb-10 2:05 
GeneralRe: and your question is? Pin
OriginalGriff26-Feb-10 4:08
mveOriginalGriff26-Feb-10 4:08 
GeneralRe: and your question is? Pin
Luc Pattyn26-Feb-10 6:53
sitebuilderLuc Pattyn26-Feb-10 6:53 
QuestionDrag Drop from .net application to outside it Pin
Aseem Sharma26-Feb-10 1:56
Aseem Sharma26-Feb-10 1:56 
AnswerRe: Drag Drop from .net application to outside it Pin
Saksida Bojan26-Feb-10 2:17
Saksida Bojan26-Feb-10 2:17 
GeneralRe: Drag Drop from .net application to outside it Pin
Aseem Sharma27-Feb-10 19:28
Aseem Sharma27-Feb-10 19:28 
QuestionMouseMove event confusion Pin
ahmetkoc26-Feb-10 1:38
ahmetkoc26-Feb-10 1:38 

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.