Click here to Skip to main content
15,921,941 members
Home / Discussions / C#
   

C#

 
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 
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 
You should use a class instead of a structure, so that you can allocate instances of it that will survive the local scope.

If you would have succeeded in putting the pointer in the array, it would be a pointer to the structure allocated in the stack frame of the method. When you return from the method, the structure doesn't exist any more, so the pointer is no longer valid.

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
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 
GeneralRe: Threshold type control - calculating size Pin
Alan Balkany17-Sep-08 5:26
Alan Balkany17-Sep-08 5:26 
QuestionLog Pin
ellllllllie17-Sep-08 1:20
ellllllllie17-Sep-08 1:20 
AnswerRe: Log Pin
N a v a n e e t h17-Sep-08 2:05
N a v a n e e t h17-Sep-08 2:05 
AnswerRe: Log [modified] Pin
Colin Angus Mackay17-Sep-08 2:06
Colin Angus Mackay17-Sep-08 2:06 

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.