Click here to Skip to main content
15,912,897 members
Home / Discussions / C#
   

C#

 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Alan Balkany17-Sep-08 3:35
Alan Balkany17-Sep-08 3:35 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Preetham.N17-Sep-08 3:42
Preetham.N17-Sep-08 3:42 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Alan Balkany17-Sep-08 3:45
Alan Balkany17-Sep-08 3:45 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Preetham.N17-Sep-08 3:47
Preetham.N17-Sep-08 3:47 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Alan Balkany17-Sep-08 3:58
Alan Balkany17-Sep-08 3:58 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Preetham.N17-Sep-08 4:06
Preetham.N17-Sep-08 4:06 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Alan Balkany17-Sep-08 4:38
Alan Balkany17-Sep-08 4:38 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Guffa17-Sep-08 8:52
Guffa17-Sep-08 8:52 
Alan Balkany wrote:
I suspect the array of structs is five 14-byte structures that follow each other in memory.


Actually it's five 16-byte structures that follow each other in memory. The members in the struct are padded to the next word boundary, so there is two unused bytes after the ushort.

Alan Balkany wrote:
But if a class is used, I suspect the array is five 4-byte pointers to RoomDef objects allocated in the heap.


The array is five references (4 or 8 bytes depending on the platform), however no RoomDef objects are created to populate the array when the array is created. All the references are null from start.

Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Alan Balkany18-Sep-08 3:52
Alan Balkany18-Sep-08 3:52 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Alan Balkany17-Sep-08 4:04
Alan Balkany17-Sep-08 4:04 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) [modified] Pin
Guffa17-Sep-08 8:46
Guffa17-Sep-08 8:46 
AnswerRe: Help with unsafe code ( array of pointer to a stucture) Pin
Guffa17-Sep-08 3:25
Guffa17-Sep-08 3:25 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Preetham.N17-Sep-08 3:33
Preetham.N17-Sep-08 3:33 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Guffa17-Sep-08 8:40
Guffa17-Sep-08 8:40 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Preetham.N17-Sep-08 3:50
Preetham.N17-Sep-08 3:50 
AnswerRe: Help with unsafe code ( array of pointer to a stucture) Pin
Preetham.N17-Sep-08 23:40
Preetham.N17-Sep-08 23:40 
QuestionHow to Set Expiration Policy to an Application Object in ASP.Net Applciation? Pin
BhanuRegonda17-Sep-08 1:56
BhanuRegonda17-Sep-08 1:56 
AnswerRe: How to Set Expiration Policy to an Application Object in ASP.Net Applciation? Pin
N a v a n e e t h17-Sep-08 2:08
N a v a n e e t h17-Sep-08 2:08 
QuestionThreshold type control - calculating size Pin
Gareth H17-Sep-08 1:51
Gareth H17-Sep-08 1:51 
AnswerRe: Threshold type control - calculating size Pin
BhanuRegonda17-Sep-08 2:01
BhanuRegonda17-Sep-08 2:01 
GeneralRe: Threshold type control - calculating size Pin
Gareth H17-Sep-08 2:06
Gareth H17-Sep-08 2:06 
AnswerRe: Threshold type control - calculating size Pin
Alan Balkany17-Sep-08 3:33
Alan Balkany17-Sep-08 3:33 
GeneralRe: Threshold type control - calculating size Pin
Gareth H17-Sep-08 4:06
Gareth H17-Sep-08 4:06 
GeneralRe: Threshold type control - calculating size Pin
Alan Balkany17-Sep-08 4:40
Alan Balkany17-Sep-08 4:40 
GeneralRe: Threshold type control - calculating size Pin
Gareth H17-Sep-08 5:19
Gareth H17-Sep-08 5:19 

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.