Martin,
I still think it can be made better. For example, if in c# I could say:
i = (int) SocketOptionName.Broadcast;
I can get the correct value, but in IronPython I can't say:
int(SocketOptionName.Broadcast)
since I will not get the correct value back.
I do see your point, but I think that
Title: RE: [IronPython] Access to Enumeration Values
I agree with the automatic conversion and the ability to pass then into int(enum) to get the value out. I think that it makes sense to keep the rest as is, such as print the "Broadcast" when the enum value is such.
Thanks for th
Hi Anthony,
I don't think it is a bug. The value you get when getting an enum value
(SocketOptionName.Broadcast) is indeed the value itself:
x = SocketOptions.Broadcast
x becomes a boxed enum object. It is the ToString() method of the enum
object prints the name. Consider following C# code that