B
Boni
Hi,
I have a class to serialize. This class has come properties like this one
private myObject _listOf;
public myObject listOf
{
get {
if(_listOf==null)
{
_listOf=myClass.getMyObjectList();
}
return _listOf;
}
}
When I serialize this class and _listOf==null it calls the function
myClass.getMyObjectList().
But I want that when serialize it has to return the current value of the
property _listOf, if null too, without calls the funtion.
It's possible know when a class is "unser serialization"? and change the
code in something like that?
....
get {
if(this.underSerialization)return _listOf;
if(_listOf==null)
{
_listOf=myClass.getMyObjectList();
}
return _listOf;
}
....
Thank you.
Regards
I have a class to serialize. This class has come properties like this one
private myObject _listOf;
public myObject listOf
{
get {
if(_listOf==null)
{
_listOf=myClass.getMyObjectList();
}
return _listOf;
}
}
When I serialize this class and _listOf==null it calls the function
myClass.getMyObjectList().
But I want that when serialize it has to return the current value of the
property _listOf, if null too, without calls the funtion.
It's possible know when a class is "unser serialization"? and change the
code in something like that?
....
get {
if(this.underSerialization)return _listOf;
if(_listOf==null)
{
_listOf=myClass.getMyObjectList();
}
return _listOf;
}
....
Thank you.
Regards