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

C#

 
GeneralIncluding a manifest file within the exe file Pin
Anonymous23-Apr-05 23:34
Anonymous23-Apr-05 23:34 
GeneralRe: Including a manifest file within the exe file Pin
DavidNohejl24-Apr-05 2:06
DavidNohejl24-Apr-05 2:06 
Generalwindows services Pin
sianatia23-Apr-05 23:18
sianatia23-Apr-05 23:18 
GeneralRe: windows services Pin
Claudio Grazioli24-Apr-05 6:14
Claudio Grazioli24-Apr-05 6:14 
GeneralList the files in another computer Pin
Johny Ng23-Apr-05 18:58
Johny Ng23-Apr-05 18:58 
GeneralRe: List the files in another computer Pin
lubos_h24-Apr-05 2:06
lubos_h24-Apr-05 2:06 
GeneralValue Types Vs Reference Types Pin
vchedalla23-Apr-05 18:57
vchedalla23-Apr-05 18:57 
GeneralRe: Value Types Vs Reference Types Pin
Colin Angus Mackay23-Apr-05 22:42
Colin Angus Mackay23-Apr-05 22:42 
vchedalla wrote:
if reference type contains value type as a member,where does meomory allocated for value types?

On the heap with the rest of the reference type.

The idea that value types are always created on the stack is not correct. If you have a method that creates a value type as part of its operation then it will be created on the stack, when the method ends it will be removed from the stack, along with everything else that was created on the stack during the method - and that includes any references to objects (NOTE: not the actual object - that will be done by the garbage collector if there are no other references to the object)

When a value type is a member variable of an object then it will be placed on the heap as it would not be logical to put it on the stack. A stack, as the name suggests, is built up as values are placed on it, and brought down as they are removed. You cannot remove a value from the middle of the stack.


vchedalla wrote:
Value types are initialized to zero or null. does reference type member variables are initialized to zero or null?

Value types cannot be initialised to null, but they can be initialised to some default value (like 0). Reference types are initialised to null.


My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More


Generalusing the serial port Pin
Mridang Agarwalla23-Apr-05 18:06
Mridang Agarwalla23-Apr-05 18:06 
GeneralRe: using the serial port Pin
Peter Ritchie24-Apr-05 8:21
Peter Ritchie24-Apr-05 8:21 
GeneralException handling problem.. Pin
23-Apr-05 13:51
suss23-Apr-05 13:51 
GeneralRe: Exception handling problem.. Pin
Carl Mercier23-Apr-05 14:03
Carl Mercier23-Apr-05 14:03 
GeneralRe: Exception handling problem.. Pin
Tugbay Sahin23-Apr-05 14:55
Tugbay Sahin23-Apr-05 14:55 
GeneralRe: Exception handling problem.. Pin
Carl Mercier23-Apr-05 16:43
Carl Mercier23-Apr-05 16:43 
GeneralRe: Exception handling problem.. Pin
Dave Kreskowiak23-Apr-05 17:31
mveDave Kreskowiak23-Apr-05 17:31 
GeneralRe: Exception handling problem.. Pin
Colin Angus Mackay23-Apr-05 22:48
Colin Angus Mackay23-Apr-05 22:48 
GeneralRe: Exception handling problem.. Pin
Tugbay Sahin24-Apr-05 7:15
Tugbay Sahin24-Apr-05 7:15 
GeneralRe: Exception handling problem.. Pin
Colin Angus Mackay24-Apr-05 13:05
Colin Angus Mackay24-Apr-05 13:05 
GeneralRe: Exception handling problem.. Pin
Dave Kreskowiak24-Apr-05 16:22
mveDave Kreskowiak24-Apr-05 16:22 
GeneralRe: Exception handling problem.. Pin
Tugbay Sahin24-Apr-05 19:54
Tugbay Sahin24-Apr-05 19:54 
GeneralCreate a class an object dinamically with DataRow fields and values Pin
machocr23-Apr-05 13:18
machocr23-Apr-05 13:18 
GeneralRe: Create a class an object dinamically with DataRow fields and values Pin
machocr23-Apr-05 20:19
machocr23-Apr-05 20:19 
GeneralPocket PC mulitplayer Pin
Anonymous23-Apr-05 13:12
Anonymous23-Apr-05 13:12 
QuestionAssembly version? Pin
damir_tk23-Apr-05 13:11
damir_tk23-Apr-05 13:11 
AnswerRe: Assembly version? Pin
turbochimp23-Apr-05 17:29
turbochimp23-Apr-05 17:29 

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.