G
Guest
Hi,
I have following enum definition.
[Serializable]
[Flags]
public enum OperationTypes
{
All = 1,
New = 2,
View = 4,
Save = 8
}
public class MyTest
{
public OperationTypes GetTypes()
{
OperationTypes _Types = OperationTypes.Save | OperationTypes.New;
return _Types;
}
}
If I expose MyTest as remoting object, caller is getting exception when they
call the GetTypes() method. Exception suggest it cannot deserialize the
returned enum.
It seems SoapSerialization has problem when I use [Flags] attribute in enum
to use it as bitwise operator and if I set enum to more than one value. I I
set single value (like OperationTypes _Types = OperationTypes.Save it
works fine.
Is there any way I can overcome this problem?
I have following enum definition.
[Serializable]
[Flags]
public enum OperationTypes
{
All = 1,
New = 2,
View = 4,
Save = 8
}
public class MyTest
{
public OperationTypes GetTypes()
{
OperationTypes _Types = OperationTypes.Save | OperationTypes.New;
return _Types;
}
}
If I expose MyTest as remoting object, caller is getting exception when they
call the GetTypes() method. Exception suggest it cannot deserialize the
returned enum.
It seems SoapSerialization has problem when I use [Flags] attribute in enum
to use it as bitwise operator and if I set enum to more than one value. I I
set single value (like OperationTypes _Types = OperationTypes.Save it
works fine.
Is there any way I can overcome this problem?