Well since it can be constructed with
SomeStruct newStruct = new SomeStruct();
I would think that it would have shown this in intellisense. I am aware that
structs only can have theyre own default constructor and you cant override
it, and if you have a parameterized one ALL fields must be set before going
out of scope.
However its the same with classes, here you can just let the system supply
the DEFAULT constructor (like structs .- except theyre by design as system
supplied ONLY) but you still see it in intellisnse.
Its an anoyance.
"Marina" <nospam> wrote in message
news:uM**************@TK2MSFTNGP10.phx.gbl...
A struct always has a default constructor, since structs are value types.
As soon as you declare one, all the fields are initialized - so it is as
if you called it, without really having to call it.
You can argue that this is a bug, but it seems like it may have been a
deliberate decision to leave it out, given the behavior of structs.
"news.microsoft.com" <di********@discussion.microsoft.com> wrote in
message news:eY*************@TK2MSFTNGP11.phx.gbl... BUG: struct default constructor is not displayed on intellisense yet it
is available, BUG
Make a struct type with a parameterized constructor.
Try to construct the type in the IDE and check for the 2 overloads
(Default AND the parameterizedone) the default one is NOT displayed thus
giving the FALSE impresison that it DOES NOT exist.
BUG