enum's underlying type might be). One can control the rendered value for an
"Pedro" <peter4jc@hotmail.com> wrote in message
news:eOYbRbocGHA.3888@TK2MSFTNGP02.phx.gbl...
> Thanks alot for the help Nicole
>
> The result im getting is now the XML containing the actual names
> resulting in:
>
> <Nums>Two Four</Nums>
>
> So i'm getting the actual enum names space separated.
> What I would like is the actual number instead for AND bitwising.
> I dont suppose you know how to do this?
>
>
> Thanks
> Pedro
>
>
> "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
> news:u9nov9ccGHA.2068@TK2MSFTNGP02.phx.gbl...
>> Have you tried applying FlagsAttribute
>> (
http://msdn2.microsoft.com/en-US/library/system.flagsattribute.aspx) to
>> the enum?
>>
>>
>> "Pedro" <peter4jc@hotmail.com> wrote in message
>> news:eqxN$5ccGHA.536@TK2MSFTNGP02.phx.gbl...
>>> Hello,
>>>
>>> Here's a piece of code that i have which is giving me an error and im
>>> not sure how to fix it.
>>> I'm trying to serialize an enum variable wich a value outside of the
>>> enum list and the serializer throws an error saying its an invalid value
>>> (of course). But how toget around it?
>>>
>>> Public Class foo
>>>
>>> Public Enum Nums
>>> Zero = 0
>>> One = 1
>>> Two = 2
>>> Four = 4
>>> End Enum
>>>
>>> Public MyNum = Two Or Four (this would result on a number 6)
>>>
>>> End Class
>>>
>>> I would like to be able to serialize the number, not so much the actual
>>> text.
>>> I've tried <xmlInclude(gettype(Integer)> but it says that primitive
>>> types are not allowed.
>>>
>>>
>>> Any ideas?
>>>
>>>
>>> Thanks
>>>
>>
>>
>
>