Groups | Blog | Home
all groups > dotnet remoting > april 2007 >

dotnet remoting : no parameterless constructor


Peter Morris
4/29/2007 12:00:00 AM
Each of my business objects belong to a specific "object space" and as a
result have no parameterless constructor. Is it possible to make my objects
serialisable so that they are created like so


Person serializedPerson = new Person(CorrectObjectSpace);


Thanks

Pete

Günter Prossliner
5/7/2007 12:00:00 AM
Hello Peter!

[quoted text, click to view]

No. Serialization needs an parameterless ctor (which doesn`t need to be
public). You can use the Deserialization - Callback Mechanisms (.NET 2.0) do
set an "ObjectSpace" instance on deserilization.


GP

AddThis Social Bookmark Button