As Marc correctly explained this is not possible. If you don't want to
create constructors I'd suggest using one standard that can be found in
almost all framework value types that is ro have a property Empty that
returns initialzied *empty* object. You can create and store such an object
in a static variable so you don't have to create a new one each time. Having
such a property you can write a code like the following:
Foo f = Foo.Empty;
Then you need to give value only to the field you use.
--
HTH
Stoitcho Goutsev (100)
"Marc Gravell" <ma**********@gmail.comwrote in message
news:uM**************@TK2MSFTNGP05.phx.gbl...
Nope; it must be assigned; what you have is comparable to:
int a;
a.ToString();
which fails for the same reason; you /must/ give it a starting value, even
if it is just "new MyStruct();"
Marc