Hi,
thanks for looking into my problem.
the code (managed C++) goes like this:
public __gc class SomeClass : public System::ComponentModel::Component
{
public:
SomeClass();
SomeClass(System::ComponentModel::IContainer container);
....
[DefaultValue(NULL)]
__property String* get_Kind();
[DefaultValue(NULL)]
__property String* set_Kind(String* value);
....
// other properties and methods
};
This class gets compiled into a component library. After dropping this
component on
a form (in C Sharp), the designer adds this line to the InitializeComponent
method of the form:
this.someClass1.Kind = null;
while I explicitly stated that that's the default value. BTW, it works as
expected with other types
like int, short, ...
I don't get it.
I am not using VS.NET 2003. It might be solved already (if it's a bug).
regards,
Bram.
"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:Ok**************@tk2msftngp13.phx.gbl...
Bram,
microsoft.public.dotnet.languages.vc is a better group for C++
questions.
Now the IDE keeps inserting null-assignments for
the string properties, while I've specified that NULL is
the default value. Other types work well.
Can you post your code?
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.