471,310 Members | 1,042 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

enum problem

enum DaysOfWeek
{ Sunday = 1, Monday = 2, Tuesday = 3, Wednesday = 4, Thursday = 5, Friday =
6, Saturday = 7 }

Enum above gives 0 for sunday and rest are one digit below then what is
assigned. What am I doing wrong?

Thanks.
Dec 8 '05 #1
5 1118
Please ignore, found the problem (with ns) as System has its own DayOfWeek

"Pohihihi" <po******@hotmail.com> wrote in message
news:uE***************@tk2msftngp13.phx.gbl...
enum DaysOfWeek
{ Sunday = 1, Monday = 2, Tuesday = 3, Wednesday = 4, Thursday = 5, Friday
= 6, Saturday = 7 }

Enum above gives 0 for sunday and rest are one digit below then what is
assigned. What am I doing wrong?

Thanks.

Dec 8 '05 #2
There is already a DaysofWeek

-------
Regards ,
C#, VB.NET , SQL SERVER , UML , DESIGN Patterns Interview question book
http://www.geocities.com/dotnetinterviews/
My Interview Blog
http://spaces.msn.com/members/dotnetinterviews/

Dec 8 '05 #3
Just one thing on this if you are using Webservices.

I found when using enums with Webservices, that they do get renumbered when
used on the client (something to do with the proxy object(s)). So

Enum Test {One = 1, Two = 2, Six = 6}

declared in the webservice on the webserver, becomes:

Enum Test {One = 0, Two = 1, Six = 3}

On the client that has created a proxy object to the webservice.

"Pohihihi" <po******@hotmail.com> wrote in message
news:uE***************@tk2msftngp13.phx.gbl...
enum DaysOfWeek
{ Sunday = 1, Monday = 2, Tuesday = 3, Wednesday = 4, Thursday = 5, Friday
= 6, Saturday = 7 }

Enum above gives 0 for sunday and rest are one digit below then what is
assigned. What am I doing wrong?

Thanks.

Dec 8 '05 #4
Hi,

Yes, it does :)

In case you want to use yours all you have to do is using the fullname :
MyNameSpace.DaysOfWeek
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Pohihihi" <po******@hotmail.com> wrote in message
news:e9****************@TK2MSFTNGP11.phx.gbl...
Please ignore, found the problem (with ns) as System has its own DayOfWeek

"Pohihihi" <po******@hotmail.com> wrote in message
news:uE***************@tk2msftngp13.phx.gbl...
enum DaysOfWeek
{ Sunday = 1, Monday = 2, Tuesday = 3, Wednesday = 4, Thursday = 5,
Friday = 6, Saturday = 7 }

Enum above gives 0 for sunday and rest are one digit below then what is
assigned. What am I doing wrong?

Thanks.


Dec 8 '05 #5
Thx for the additional info, as I don't do web related work I did not know
this, but good to know now. Thx agian.
"Paul" <no****@noone.com> wrote in message
news:eB****************@TK2MSFTNGP09.phx.gbl...
Just one thing on this if you are using Webservices.

I found when using enums with Webservices, that they do get renumbered
when used on the client (something to do with the proxy object(s)). So

Enum Test {One = 1, Two = 2, Six = 6}

declared in the webservice on the webserver, becomes:

Enum Test {One = 0, Two = 1, Six = 3}

On the client that has created a proxy object to the webservice.

"Pohihihi" <po******@hotmail.com> wrote in message
news:uE***************@tk2msftngp13.phx.gbl...
enum DaysOfWeek
{ Sunday = 1, Monday = 2, Tuesday = 3, Wednesday = 4, Thursday = 5,
Friday = 6, Saturday = 7 }

Enum above gives 0 for sunday and rest are one digit below then what is
assigned. What am I doing wrong?

Thanks.


Dec 8 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Alexander Grigoriev | last post: by
reply views Thread by Vaclav Haisman | last post: by
6 posts views Thread by James Brown | last post: by
21 posts views Thread by Andreas Huber | last post: by
18 posts views Thread by Visual Systems AB \(Martin Arvidsson\) | last post: by
10 posts views Thread by kar1107 | last post: by
13 posts views Thread by toton | last post: by
3 posts views Thread by Cmtk Software | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.