Re: Value type and a parameterless constructor
- From: Ashutosh Bhawasinka <discussion@xxxxxxxxxxx>
- Date: Tue, 04 Nov 2008 00:11:20 +0530
For value types you can't explicitly create a parameterless constructor, because the compiler doest that.
Yes, you will still have a parameterless constructor provided by the compiler.
puzzlecracker wrote:
"The C# specification states that all value types have a default.
parameterless constructor, and it uses the same syntax to call both
explicitly declared constructors and the parameterless one, relying on
the compiler to do the right thing underneath."
Does it mean that if we create a Value type with other constructors,
we will still have a parameterless constructor provided by compiler?
- Follow-Ups:
- Re: Value type and a parameterless constructor
- From: Jon Skeet [C# MVP]
- Re: Value type and a parameterless constructor
- References:
- Value type and a parameterless constructor
- From: puzzlecracker
- Value type and a parameterless constructor
- Prev by Date: Re: validating client in socket communciation
- Next by Date: Re: HELP File path confusion in WinForms app
- Previous by thread: Value type and a parameterless constructor
- Next by thread: Re: Value type and a parameterless constructor
- Index(es):
Relevant Pages
|