M
Mantorok
Hi
We have a C3Exception class derived from ApplicationException, however when
the exeption is thrown from a remote-server it complains that the
C3Exception is not marked as serializable, however, when I implement
ISerializable it still complains, any ideas?
Here is the code:
// Class: C3Exception
// The base class for all C3 exceptions
public class C3Exception : ApplicationException, ISerializable
{
// Constructor: C3Exception
// Argument:
// msg - The exception error message
public C3Exception(string msg)
: base(msg)
{
}
// Constructor: C3Exception
// This version formats the msg string using String.Format() and accepts
// its arguments in the same way.
// Arguments:
// msg - The exception error message
// args - Arguments for insertion into the message
public C3Exception(string msg, params object [] args)
: base(string.Format(msg, args))
{
}
public C3Exception(SerializationInfo info, StreamingContext context) :
base(info, context)
{
}
public void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
}
}
Thanks
Kev
We have a C3Exception class derived from ApplicationException, however when
the exeption is thrown from a remote-server it complains that the
C3Exception is not marked as serializable, however, when I implement
ISerializable it still complains, any ideas?
Here is the code:
// Class: C3Exception
// The base class for all C3 exceptions
public class C3Exception : ApplicationException, ISerializable
{
// Constructor: C3Exception
// Argument:
// msg - The exception error message
public C3Exception(string msg)
: base(msg)
{
}
// Constructor: C3Exception
// This version formats the msg string using String.Format() and accepts
// its arguments in the same way.
// Arguments:
// msg - The exception error message
// args - Arguments for insertion into the message
public C3Exception(string msg, params object [] args)
: base(string.Format(msg, args))
{
}
public C3Exception(SerializationInfo info, StreamingContext context) :
base(info, context)
{
}
public void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
}
}
Thanks
Kev