Click here to Skip to main content
15,887,401 members
Home / Discussions / C#
   

C#

 
GeneralRe: Remote Access UDP hole punching Pin
Dave Kreskowiak15-May-16 17:20
mveDave Kreskowiak15-May-16 17:20 
GeneralRe: Remote Access UDP hole punching Pin
sigridslima16-May-16 0:56
sigridslima16-May-16 0:56 
GeneralRe: Remote Access UDP hole punching Pin
Dave Kreskowiak16-May-16 1:24
mveDave Kreskowiak16-May-16 1:24 
QuestionI can not Parse JSON to string Pin
aheda12-May-16 5:01
aheda12-May-16 5:01 
AnswerRe: I can not Parse JSON to string Pin
Richard Deeming12-May-16 5:31
mveRichard Deeming12-May-16 5:31 
QuestionCannot convert source type object[,] to target type object[][] Pin
gpc4412-May-16 4:21
gpc4412-May-16 4:21 
GeneralRe: Cannot convert source type object[,] to target type object[][] Pin
CHill6012-May-16 4:22
mveCHill6012-May-16 4:22 
AnswerRe: Cannot convert source type object[,] to target type object[][] Pin
OriginalGriff12-May-16 4:54
mveOriginalGriff12-May-16 4:54 
You can't convert a 2D array directly to a jagged array: they are very different.
A 2D array (say 3 columns of 5 rows of integers) is a block of memory 15 integers long, that is accessed via a row and column address:
C#
myArray[2, 4] => integer at [myArray + (4 * 3 * sizeof(int32)) + 2]

A jagged array is something else: it's a 1D array of references to 1D arrays. So if ther are the same size:
C#
myJaggedArray[2][4] => Get the array at [myJaggedArray + (2 * sizeof(Reference))], then use it in [subArray + (4 * sizeof(int32))] to fetch the value.

You can't "magically" convert between them, because there are memory allocations that need to be done, and bounds checking that changes between them: a jagged array doesn't have to have all it's rows with the same number of columns.

If you want to convert you will have to write the code to allocate the new 1D array, allocate each of the row arrays yourself, and manually fill the appropriate cells.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

QuestionConverting from autocad dwg file to both PDF and Image Pin
Thiha Soe Htet -1140164211-May-16 19:08
Thiha Soe Htet -1140164211-May-16 19:08 
AnswerRe: Converting from autocad dwg file to both PDF and Image Pin
OriginalGriff11-May-16 23:14
mveOriginalGriff11-May-16 23:14 
GeneralRe: Converting from autocad dwg file to both PDF and Image Pin
Thiha Soe Htet -1140164212-May-16 1:23
Thiha Soe Htet -1140164212-May-16 1:23 
Question.Net Framework 4.0 and upper Pin
gautamkhatri42810-May-16 18:57
gautamkhatri42810-May-16 18:57 
AnswerRe: .Net Framework 4.0 and upper Pin
Mycroft Holmes10-May-16 20:23
professionalMycroft Holmes10-May-16 20:23 
AnswerRe: .Net Framework 4.0 and upper Pin
Kornfeld Eliyahu Peter10-May-16 21:05
professionalKornfeld Eliyahu Peter10-May-16 21:05 
AnswerRe: .Net Framework 4.0 and upper Pin
koolprasad200310-May-16 23:16
professionalkoolprasad200310-May-16 23:16 
GeneralClickOnce : Unknown Publisher Pin
Jaimesh.241110-May-16 0:55
Jaimesh.241110-May-16 0:55 
Rant[REPOST] ClickOnce : Unknown Publisher Pin
Richard Deeming10-May-16 1:16
mveRichard Deeming10-May-16 1:16 
GeneralRe: [REPOST] ClickOnce : Unknown Publisher Pin
Jaimesh.241110-May-16 1:35
Jaimesh.241110-May-16 1:35 
AnswerRe: ClickOnce : Unknown Publisher Pin
Pete O'Hanlon10-May-16 1:49
mvePete O'Hanlon10-May-16 1:49 
GeneralRe: ClickOnce : Unknown Publisher Pin
Jaimesh.241110-May-16 1:54
Jaimesh.241110-May-16 1:54 
GeneralRe: ClickOnce : Unknown Publisher Pin
Pete O'Hanlon10-May-16 2:26
mvePete O'Hanlon10-May-16 2:26 
GeneralRe: ClickOnce : Unknown Publisher Pin
Jaimesh.241110-May-16 2:34
Jaimesh.241110-May-16 2:34 
GeneralRe: ClickOnce : Unknown Publisher Pin
Pete O'Hanlon10-May-16 3:02
mvePete O'Hanlon10-May-16 3:02 
QuestionBest method to automate website filling in Google Chrome Pin
srikrishnathanthri8-May-16 23:26
srikrishnathanthri8-May-16 23:26 
AnswerRe: Best method to automate website filling in Google Chrome Pin
Richard MacCutchan8-May-16 23:56
mveRichard MacCutchan8-May-16 23:56 

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.