B
Bry
I have an object which contains an object of type ServiceController[].
When I attempt to serialize this object using a binary formatter, I
receive the runtime error message, "...is not marked as serializable".
Code snippet:
[serializable]
class MyObject
{
// One of the properties
private ServiceController[] serviceState;
// more code
public void LoadServices()
{
serviceState = ServiceController.GetServices();
}
}
How can I easily make this object serializable?
Thanks,
Bry.
When I attempt to serialize this object using a binary formatter, I
receive the runtime error message, "...is not marked as serializable".
Code snippet:
[serializable]
class MyObject
{
// One of the properties
private ServiceController[] serviceState;
// more code
public void LoadServices()
{
serviceState = ServiceController.GetServices();
}
}
How can I easily make this object serializable?
Thanks,
Bry.