Click here to Skip to main content
15,922,166 members
Home / Discussions / C#
   

C#

 
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 
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 
Alan Balkany wrote:
I think you can have a pointer to a value type.


Yes, you can, but the variable we are talking about is not a pointer.

Alan Balkany wrote:
When you make a struct with 'new' I think it's allocated in the heap.


No, it's not. The constructor only creates the value, it's not allocated anywhere. In this case the value is then assigned to the local variable.

Alan Balkany wrote:
I think structs are only put on the stack when they're local variables.


It is a local variable.

Besides, a struct is never allocated on the heap by itself. A struct can be a part of a class that is allocated on the heap, it can be part of an array that is allocated on the heap, or it can be boxed inside an object that is allocated on the heap, but never on it's own.

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

modified on Wednesday, September 17, 2008 2:55 PM

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 
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 

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.