Click here to Skip to main content
15,900,110 members
Home / Discussions / C#
   

C#

 
GeneralRe: default constructor? Pin
Guffa16-Jun-08 1:03
Guffa16-Jun-08 1:03 
GeneralRe: default constructor? Pin
S. Senthil Kumar15-Jun-08 20:45
S. Senthil Kumar15-Jun-08 20:45 
GeneralRe: default constructor? Pin
George_George15-Jun-08 20:47
George_George15-Jun-08 20:47 
GeneralRe: default constructor? Pin
S. Senthil Kumar15-Jun-08 20:50
S. Senthil Kumar15-Jun-08 20:50 
GeneralRe: default constructor? Pin
George_George15-Jun-08 21:01
George_George15-Jun-08 21:01 
GeneralRe: default constructor? Pin
Christian Flutcher15-Jun-08 21:09
Christian Flutcher15-Jun-08 21:09 
GeneralRe: default constructor? Pin
George_George15-Jun-08 21:25
George_George15-Jun-08 21:25 
GeneralRe: default constructor? Pin
S. Senthil Kumar15-Jun-08 21:11
S. Senthil Kumar15-Jun-08 21:11 
George_George wrote:
So, for statement like below, the memory for new instance of abc is actually allocated even if we do not use new + constructor explicitly. But for reference type, without using new, no instances' space are allocated. Correct?


Depends on what you call memory? In both cases, stack space will be reserved for holding the local variable. In the case of reference types, space on the heap will not be allocated until you call new. That doesn't apply for value types obviously, so stack space will be reserved right away.

Regards
Senthil [MVP - Visual C#]
_____________________________
My Blog | My Articles | My Flickr | WinMacro

GeneralRe: default constructor? Pin
Christian Flutcher15-Jun-08 21:19
Christian Flutcher15-Jun-08 21:19 
GeneralRe: default constructor? Pin
George_George15-Jun-08 21:29
George_George15-Jun-08 21:29 
GeneralRe: default constructor? Pin
S. Senthil Kumar15-Jun-08 23:08
S. Senthil Kumar15-Jun-08 23:08 
GeneralRe: default constructor? Pin
George_George15-Jun-08 21:27
George_George15-Jun-08 21:27 
GeneralRe: default constructor? Pin
Christian Flutcher15-Jun-08 20:53
Christian Flutcher15-Jun-08 20:53 
GeneralRe: default constructor? Pin
George_George15-Jun-08 21:03
George_George15-Jun-08 21:03 
GeneralRe: default constructor? Pin
Christian Flutcher15-Jun-08 21:13
Christian Flutcher15-Jun-08 21:13 
GeneralRe: default constructor? Pin
George_George15-Jun-08 21:28
George_George15-Jun-08 21:28 
QuestionDeserializing a xml document for sending it using a WebService Pin
beatles169215-Jun-08 19:17
beatles169215-Jun-08 19:17 
AnswerRe: Deserializing a xml document for sending it using a WebService Pin
Erik Westermann16-Jun-08 10:57
professionalErik Westermann16-Jun-08 10:57 
GeneralRe: Deserializing a xml document for sending it using a WebService Pin
beatles169216-Jun-08 20:06
beatles169216-Jun-08 20:06 
QuestionTime Format Pin
somagunasekaran15-Jun-08 18:51
somagunasekaran15-Jun-08 18:51 
AnswerRe: Time Format Pin
Syed Shahid Hussain15-Jun-08 18:56
Syed Shahid Hussain15-Jun-08 18:56 
GeneralRe: Time Format Pin
somagunasekaran15-Jun-08 19:04
somagunasekaran15-Jun-08 19:04 
GeneralRe: Time Format Pin
ginji2015-Jun-08 20:18
ginji2015-Jun-08 20:18 
AnswerRe: Time Format Pin
Nouman Bhatti15-Jun-08 21:03
Nouman Bhatti15-Jun-08 21:03 
AnswerRe: Time Format Pin
PIEBALDconsult16-Jun-08 5:47
mvePIEBALDconsult16-Jun-08 5:47 

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.