473,765 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Enum problem

HI

Public Enum WindowStyles As UInteger
WS_OVERLAPPED = 0x00000000
WS_POPUP = 0x80000000
WS_CHILD = 0x40000000
end enum
In the above i get an error at
0x00000000 , 0x80000000 , 0x40000000
message "End of statement expected"

how do i correct them

TIA
Barry
Apr 3 '07 #1
11 6958
On Apr 3, 8:03 am, "MSNEWS" <some...@somewh ere.comwrote:
HI

Public Enum WindowStyles As UInteger
WS_OVERLAPPED = 0x00000000
WS_POPUP = 0x80000000
WS_CHILD = 0x40000000
end enum

In the above i get an error at
0x00000000 , 0x80000000 , 0x40000000
message "End of statement expected"

how do i correct them

TIA
Barry
Public Enum WindowStyles As UInteger
WS_OVERLAPPED = &H00000000
WS_POPUP = &H80000000
WS_CHILD = &H40000000
End Enum
Apr 3 '07 #2
In VB.NET you don't use the C++ way of specifying hex. Use this instead:

Public Enum WindowStyles As UInteger
WS_OVERLAPPED = &H00000000
WS_POPUP = &H80000000
WS_CHILD = &H40000000
end enum


"MSNEWS" <so*****@somewh ere.comwrote in message
news:u1******** ******@TK2MSFTN GP05.phx.gbl...
HI

Public Enum WindowStyles As UInteger
WS_OVERLAPPED = 0x00000000
WS_POPUP = 0x80000000
WS_CHILD = 0x40000000
end enum
In the above i get an error at
0x00000000 , 0x80000000 , 0x40000000
message "End of statement expected"

how do i correct them

TIA
Barry


Apr 3 '07 #3
Thank you guys for your quick response.

I am basically trying to convert a C# app to VB.NET

I am stiil getting a error at &0x00000 (near &) in VS 2005

message is "Expression expected"
"MSNEWS" <so*****@somewh ere.comwrote in message
news:u1******** ******@TK2MSFTN GP05.phx.gbl...
HI

Public Enum WindowStyles As UInteger
WS_OVERLAPPED = 0x00000000
WS_POPUP = 0x80000000
WS_CHILD = 0x40000000
end enum
In the above i get an error at
0x00000000 , 0x80000000 , 0x40000000
message "End of statement expected"

how do i correct them

TIA
Barry


Apr 4 '07 #4
Thank you guys for your quick response.
>
I am basically trying to convert a C# app to VB.NET

I am stiil getting a error at &0x00000 (near &) in VS 2005

message is "Expression expected"
ok... you''ve peeked my interest now :)

This should be pretty simple, but I haven't dealt with hex numbers in a while
so I there could definitley be mistakes in here somewhere :).

I converted the code myself in my copy of VS2005

-------------------------------------------------------------
Public Enum WindowStyles As UInteger
WS_OVERLAPPED = &H0
WS_POPUP = &H80000000
WS_CHILD = &H40000000
End Enum
-------------------------------------------------------------

After this convertion I found myself with an error, no where you suggested,
but instead under the value '&h80000000'.
It seems that this number falls outside of the allowed range of a UInteger.

Closer evaluation leads me to believe that this is in fact a negative number
(-2147483648) this will clearly not fit inside an unsigned integer (UInteger
) as this only allows positive numbers.

Either your values are wrong or alternatively this enum should be based on
an Integer rather than a UInteger.

I have looked up the value of WS_popup and it seems to be correct.

Therefore, as far as I can tell, your code should read...
-------------------------------------------------------------
Public Enum WindowStyles As Integer
WS_OVERLAPPED = &H0
WS_POPUP = &H80000000
WS_CHILD = &H40000000
End Enum
-------------------------------------------------------------
... which yields no errors on my system
I hope this helps

--
Rory

Apr 4 '07 #5
Hi Rory

Does this mean i will have to convert all values to Hex (&H0 etc) ??

I find that the following value do not give any error

WM_SYSCOLORCHAN GE = 0x0015

WM_ENDSESSION = 0x0016

WM_SHOWWINDOW = 0x0018

WM_WININICHANGE = 0x001A

WM_SETTINGCHANG E = 0x001A

WM_DEVMODECHANG E = 0x001B

WM_ACTIVATEAPP = 0x001C

WM_FONTCHANGE = 0x001D

WM_TIMECHANGE = 0x001E

WM_CANCELMODE = 0x001F

WM_SETCURSOR = 0x0020

WM_MOUSEACTIVAT E = 0x0021

whereas these give an error

WM_NULL = 0x0000

WM_CREATE = 0x0001

WM_DESTROY = 0x0002

WM_MOVE = 0x0003

WM_SIZE = 0x0005

WM_ACTIVATE = 0x0006

WM_SETFOCUS = 0x0007

WM_KILLFOCUS = 0x0008

WM_ENABLE = 0x000A

WM_SETREDRAW = 0x000B

WM_SETTEXT = 0x000C

WM_GETTEXT = 0x000D

WM_GETTEXTLENGT H = 0x000E

WM_PAINT = 0x000F

WM_CLOSE = 0x0010

WM_QUERYENDSESS ION = 0x0011

WM_QUIT = 0x0012

WM_QUERYOPEN = 0x0013

WM_ERASEBKGND = 0x0014

Barry
"Rory Becker" <Ro********@new sgroup.nospamwr ote in message
news:b0******** *************** **@msnews.micro soft.com...
>Thank you guys for your quick response.

I am basically trying to convert a C# app to VB.NET

I am stiil getting a error at &0x00000 (near &) in VS 2005

message is "Expression expected"

ok... you''ve peeked my interest now :)

This should be pretty simple, but I haven't dealt with hex numbers in a
while so I there could definitley be mistakes in here somewhere :).

I converted the code myself in my copy of VS2005

-------------------------------------------------------------
Public Enum WindowStyles As UInteger
WS_OVERLAPPED = &H0
WS_POPUP = &H80000000
WS_CHILD = &H40000000
End Enum
-------------------------------------------------------------

After this convertion I found myself with an error, no where you
suggested, but instead under the value '&h80000000'.
It seems that this number falls outside of the allowed range of a
UInteger.
Closer evaluation leads me to believe that this is in fact a negative
number (-2147483648) this will clearly not fit inside an unsigned integer
(UInteger ) as this only allows positive numbers.
Either your values are wrong or alternatively this enum should be based on
an Integer rather than a UInteger.

I have looked up the value of WS_popup and it seems to be correct.

Therefore, as far as I can tell, your code should read...
-------------------------------------------------------------
Public Enum WindowStyles As Integer
WS_OVERLAPPED = &H0
WS_POPUP = &H80000000
WS_CHILD = &H40000000
End Enum
-------------------------------------------------------------
.. which yields no errors on my system
I hope this helps

--
Rory

Apr 4 '07 #6
Rory Becker wrote:
<snip>
I converted the code myself in my copy of VS2005

-------------------------------------------------------------
Public Enum WindowStyles As UInteger
WS_OVERLAPPED = &H0
WS_POPUP = &H80000000
WS_CHILD = &H40000000
End Enum
-------------------------------------------------------------

After this convertion I found myself with an error, no where you suggested,
but instead under the value '&h80000000'.

It seems that this number falls outside of the allowed range of a UInteger.
<snip>

To me this looks like a bug, walks like a bug and quacks like bug. I
may be wrong, though. Anyway, add a "&" to the end of the value and
everything will seem to fit ("&" is the "type-character" used to
designate Integers). Did I say how much this resembles a bug, to me?
Public Enum WindowStyles As UInteger
WS_OVERLAPPED
WS_POPUP = &H80000000&
WS_CHILD = &H40000000
End Enum
HTH.

Regards,

Branco.

Apr 4 '07 #7
Does this mean i will have to convert all values to Hex (&H0 etc) ??
I'm not sure I understand

A number expressed 0x0010 is already in hex. It translates to 16 in decimal

by exchanging the '0x' for '&h' you are simply switching from a c-style syntax
to vb-style syntax

There is no changing into hex occuring here

I get no errors with any of the values you have given when I do this.

What errors are you getting now. Are they Runtime or design time?

I'm concerned that you may be puting '&h' or '0x' on the front of just any
number. If these symbols were not on the front of a number, then introducing
them will alter their value.

Hex is just a way of qualifying some digits

You could write
-------------------------------------------------------------
Enum SomeEnum as Integer
Value1 = &h0010
Value2 = &h0011
End Enum
-------------------------------------------------------------
or
-------------------------------------------------------------
Enum SomeEnum as Integer
Value1 = 16
Value2 = 17
End Enum
-------------------------------------------------------------
either means the same thing.

Can you explain what you are trying to do?
Perhaps a complete code sample.
Try for the smallest code sample that acurately portrays the problem you
are seeing.

--
Rory
Apr 4 '07 #8
Barry wrote:
<snip>
Does this mean i will have to convert all values to Hex (&H0 etc) ??

I find that the following value do not give any error
WM_SYSCOLORCHAN GE = 0x0015
WM_ENDSESSION = 0x0016
WM_SHOWWINDOW = 0x0018
WM_WININICHANGE = 0x001A
WM_SETTINGCHANG E = 0x001A
WM_DEVMODECHANG E = 0x001B
WM_ACTIVATEAPP = 0x001C
WM_FONTCHANGE = 0x001D
WM_TIMECHANGE = 0x001E
WM_CANCELMODE = 0x001F
WM_SETCURSOR = 0x0020
WM_MOUSEACTIVAT E = 0x0021
<snip>

What do you mean 'don't give any error'? The notation you're using
comes straight from C/C++. In VB, if you want to represent a value in
hexadecimal you must prepend "&H" in front of the value (i.e., replace
every "0x" by "&H" in the values above). Also note that leading zeroes
in hex numbers can be ommited (this is also true in C/C++). Therefore
both &h1A and &h001A represent the same value. Finally, remember that
the hexadecimal representation is just that, a representation. The
underlying value is still an Integer (or UInteger, or Byte, etc,
depending on how you declared the variable or enum to which the value
is being assigned). In other words, there's no difference to the
compiler if you say

WM_SETCURSOR = &H20

or

WM_SETCURSOR = 32 'the corresponding decimal value

Using the values in hexadecimal has only meaning to you, the
programmer, who can be more comfortable with seeing Windows messages
IDs represented as hexadecimal. Another programmer could prefer
something like this, instead (not that I know any programmer that
would):

<aircode>
Enum WindowsMessages
WM_NULL 'the first enum is 0 by default
WM_CREATE
WM_DESTROY
WM_MOVE
WM_SIZE = WM_MOVE +2
WM_ACTIVATE
WM_SETFOCUS
WM_KILLFOCUS
WM_ENABLE = WM_KILLFOCUS + 2
WM_SETREDRAW
WM_SETTEXT
WM_GETTEXT
WM_GETTEXTLENGT H
WM_PAINT
WM_CLOSE
WM_QUERYENDSESS ION
WM_QUIT
WM_QUERYOPEN
WM_ERASEBKGND
WM_SYSCOLORCHAN GE
WM_ENDSESSION
WM_SHOWWINDOW = WM_ENDSESSION + 2
WM_WININICHANGE = WM_SHOWWINDOW + 2
WM_SETTINGCHANG E = WM_WININICHANGE
WM_DEVMODECHANG E
WM_ACTIVATEAPP
WM_FONTCHANGE
WM_TIMECHANGE
WM_CANCELMODE
WM_SETCURSOR
WM_MOUSEACTIVAT E
'...
End Enum
</aircode>
whereas these give an error

WM_NULL = 0x0000
WM_CREATE = 0x0001
WM_DESTROY = 0x0002
WM_MOVE = 0x0003
WM_SIZE = 0x0005
WM_ACTIVATE = 0x0006
WM_SETFOCUS = 0x0007
WM_KILLFOCUS = 0x0008
WM_ENABLE = 0x000A
WM_SETREDRAW = 0x000B
WM_SETTEXT = 0x000C
WM_GETTEXT = 0x000D
WM_GETTEXTLENGT H = 0x000E
WM_PAINT = 0x000F
WM_CLOSE = 0x0010
WM_QUERYENDSESS ION = 0x0011
WM_QUIT = 0x0012
WM_QUERYOPEN = 0x0013
WM_ERASEBKGND = 0x0014
There shouldn't be any errors in these values (after you replace "0x"
by "&H", I mean). What kind of problem are you having?

Regards,

Branco.

Apr 4 '07 #9
Hi

This is part of a C# code i am trying to convert to VB.NET

Here is the errornous code, upto 0x0016 is show as error (underlined) at
design-time, rest are ok

Public Enum Msgs
WM_NULL = 0x0000
WM_CREATE = 0x0001
WM_DESTROY = 0x0002
WM_MOVE = 0x0003
WM_SIZE = 0x0005
WM_ACTIVATE = 0x0006
WM_SETFOCUS = 0x0007
WM_KILLFOCUS = 0x0008
WM_ENABLE = 0x000A
WM_SETREDRAW = 0x000B
WM_SETTEXT = 0x000C
WM_GETTEXT = 0x000D
WM_GETTEXTLENGT H = 0x000E
WM_PAINT = 0x000F
WM_CLOSE = 0x0010
WM_QUERYENDSESS ION = 0x0011
WM_QUIT = 0x0012
WM_QUERYOPEN = 0x0013
WM_ERASEBKGND = 0x0014
WM_SYSCOLORCHAN GE = 0x0015
WM_ENDSESSION = 0x0016
WM_SHOWWINDOW = 0x0018
WM_WININICHANGE = 0x001A
WM_SETTINGCHANG E = 0x001A
WM_DEVMODECHANG E = 0x001B
WM_ACTIVATEAPP = 0x001C
WM_FONTCHANGE = 0x001D
WM_TIMECHANGE = 0x001E
WM_CANCELMODE = 0x001F
WM_SETCURSOR = 0x0020
WM_MOUSEACTIVAT E = 0x0021
WM_CHILDACTIVAT E = 0x0022
WM_QUEUESYNC = 0x0023
WM_GETMINMAXINF O = 0x0024
WM_PAINTICON = 0x0026
WM_ICONERASEBKG ND = 0x0027
WM_NEXTDLGCTL = 0x0028
WM_SPOOLERSTATU S = 0x002A
WM_DRAWITEM = 0x002B
WM_MEASUREITEM = 0x002C
WM_DELETEITEM = 0x002D
WM_VKEYTOITEM = 0x002E
WM_CHARTOITEM = 0x002F
WM_SETFONT = 0x0030
WM_GETFONT = 0x0031
WM_SETHOTKEY = 0x0032
WM_GETHOTKEY = 0x0033
WM_QUERYDRAGICO N = 0x0037
WM_COMPAREITEM = 0x0039
WM_GETOBJECT = 0x003D
WM_COMPACTING = 0x0041
WM_COMMNOTIFY = 0x0044
WM_WINDOWPOSCHA NGING = 0x0046
WM_WINDOWPOSCHA NGED = 0x0047
WM_POWER = 0x0048
WM_COPYDATA = 0x004A
WM_CANCELJOURNA L = 0x004B
WM_NOTIFY = 0x004E
WM_INPUTLANGCHA NGEREQUEST = 0x0050
WM_INPUTLANGCHA NGE = 0x0051
WM_TCARD = 0x0052
WM_HELP = 0x0053
WM_USERCHANGED = 0x0054
WM_NOTIFYFORMAT = 0x0055
WM_CONTEXTMENU = 0x007B
WM_STYLECHANGIN G = 0x007C
WM_STYLECHANGED = 0x007D
WM_DISPLAYCHANG E = 0x007E
WM_GETICON = 0x007F
WM_SETICON = 0x0080
WM_NCCREATE = 0x0081
WM_NCDESTROY = 0x0082
WM_NCCALCSIZE = 0x0083
WM_NCHITTEST = 0x0084
WM_NCPAINT = 0x0085
WM_NCACTIVATE = 0x0086
WM_GETDLGCODE = 0x0087
WM_SYNCPAINT = 0x0088
WM_NCMOUSEMOVE = 0x00A0
WM_NCLBUTTONDOW N = 0x00A1
WM_NCLBUTTONUP = 0x00A2
WM_NCLBUTTONDBL CLK = 0x00A3
WM_NCRBUTTONDOW N = 0x00A4
WM_NCRBUTTONUP = 0x00A5
WM_NCRBUTTONDBL CLK = 0x00A6
WM_NCMBUTTONDOW N = 0x00A7
WM_NCMBUTTONUP = 0x00A8
WM_NCMBUTTONDBL CLK = 0x00A9
WM_KEYDOWN = 0x0100
WM_KEYUP = 0x0101
WM_CHAR = 0x0102
WM_DEADCHAR = 0x0103
WM_SYSKEYDOWN = 0x0104
WM_SYSKEYUP = 0x0105
WM_SYSCHAR = 0x0106
WM_SYSDEADCHAR = 0x0107
WM_KEYLAST = 0x0108
WM_IME_STARTCOM POSITION = 0x010D
WM_IME_ENDCOMPO SITION = 0x010E
WM_IME_COMPOSIT ION = 0x010F
WM_IME_KEYLAST = 0x010F
WM_INITDIALOG = 0x0110
WM_COMMAND = 0x0111
WM_SYSCOMMAND = 0x0112
WM_TIMER = 0x0113
WM_HSCROLL = 0x0114
WM_VSCROLL = 0x0115
WM_INITMENU = 0x0116
WM_INITMENUPOPU P = 0x0117
WM_MENUSELECT = 0x011F
WM_MENUCHAR = 0x0120
WM_ENTERIDLE = 0x0121
WM_MENURBUTTONU P = 0x0122
WM_MENUDRAG = 0x0123
WM_MENUGETOBJEC T = 0x0124
WM_UNINITMENUPO PUP = 0x0125
WM_MENUCOMMAND = 0x0126
WM_CTLCOLORMSGB OX = 0x0132
WM_CTLCOLOREDIT = 0x0133
WM_CTLCOLORLIST BOX = 0x0134
WM_CTLCOLORBTN = 0x0135
WM_CTLCOLORDLG = 0x0136
WM_CTLCOLORSCRO LLBAR = 0x0137
WM_CTLCOLORSTAT IC = 0x0138
WM_MOUSEMOVE = 0x0200
WM_LBUTTONDOWN = 0x0201
WM_LBUTTONUP = 0x0202
WM_LBUTTONDBLCL K = 0x0203
WM_RBUTTONDOWN = 0x0204
WM_RBUTTONUP = 0x0205
WM_RBUTTONDBLCL K = 0x0206
WM_MBUTTONDOWN = 0x0207
WM_MBUTTONUP = 0x0208
WM_MBUTTONDBLCL K = 0x0209
WM_MOUSEWHEEL = 0x020A
WM_PARENTNOTIFY = 0x0210
WM_ENTERMENULOO P = 0x0211
WM_EXITMENULOOP = 0x0212
WM_NEXTMENU = 0x0213
WM_SIZING = 0x0214
WM_CAPTURECHANG ED = 0x0215
WM_MOVING = 0x0216
WM_DEVICECHANGE = 0x0219
WM_MDICREATE = 0x0220
WM_MDIDESTROY = 0x0221
WM_MDIACTIVATE = 0x0222
WM_MDIRESTORE = 0x0223
WM_MDINEXT = 0x0224
WM_MDIMAXIMIZE = 0x0225
WM_MDITILE = 0x0226
WM_MDICASCADE = 0x0227
WM_MDIICONARRAN GE = 0x0228
WM_MDIGETACTIVE = 0x0229
WM_MDISETMENU = 0x0230
WM_ENTERSIZEMOV E = 0x0231
WM_EXITSIZEMOVE = 0x0232
WM_DROPFILES = 0x0233
WM_MDIREFRESHME NU = 0x0234
WM_IME_SETCONTE XT = 0x0281
WM_IME_NOTIFY = 0x0282
WM_IME_CONTROL = 0x0283
WM_IME_COMPOSIT IONFULL = 0x0284
WM_IME_SELECT = 0x0285
WM_IME_CHAR = 0x0286
WM_IME_REQUEST = 0x0288
WM_IME_KEYDOWN = 0x0290
WM_IME_KEYUP = 0x0291
WM_MOUSEHOVER = 0x02A1
WM_MOUSELEAVE = 0x02A3
WM_CUT = 0x0300
WM_COPY = 0x0301
WM_PASTE = 0x0302
WM_CLEAR = 0x0303
WM_UNDO = 0x0304
WM_RENDERFORMAT = 0x0305
WM_RENDERALLFOR MATS = 0x0306
WM_DESTROYCLIPB OARD = 0x0307
WM_DRAWCLIPBOAR D = 0x0308
WM_PAINTCLIPBOA RD = 0x0309
WM_VSCROLLCLIPB OARD = 0x030A
WM_SIZECLIPBOAR D = 0x030B
WM_ASKCBFORMATN AME = 0x030C
WM_CHANGECBCHAI N = 0x030D
WM_HSCROLLCLIPB OARD = 0x030E
WM_QUERYNEWPALE TTE = 0x030F
WM_PALETTEISCHA NGING = 0x0310
WM_PALETTECHANG ED = 0x0311
WM_HOTKEY = 0x0312
WM_PRINT = 0x0317
WM_PRINTCLIENT = 0x0318
WM_HANDHELDFIRS T = 0x0358
WM_HANDHELDLAST = 0x035F
WM_AFXFIRST = 0x0360
WM_AFXLAST = 0x037F
WM_PENWINFIRST = 0x0380
WM_PENWINLAST = 0x038F
WM_APP = 0x8000
WM_USER = 0x0400
End Enum
TIA
Barry
"Branco Medeiros" <br************ *@gmail.comwrot e in message
news:11******** *************@y 80g2000hsf.goog legroups.com...
Rory Becker wrote:
<snip>
>I converted the code myself in my copy of VS2005

-------------------------------------------------------------
Public Enum WindowStyles As UInteger
WS_OVERLAPPED = &H0
WS_POPUP = &H80000000
WS_CHILD = &H40000000
End Enum
-------------------------------------------------------------

After this convertion I found myself with an error, no where you
suggested,
but instead under the value '&h80000000'.

It seems that this number falls outside of the allowed range of a
UInteger.
<snip>

To me this looks like a bug, walks like a bug and quacks like bug. I
may be wrong, though. Anyway, add a "&" to the end of the value and
everything will seem to fit ("&" is the "type-character" used to
designate Integers). Did I say how much this resembles a bug, to me?
> Public Enum WindowStyles As UInteger
WS_OVERLAPPED
WS_POPUP = &H80000000&
> WS_CHILD = &H40000000
End Enum

HTH.

Regards,

Branco.

Apr 5 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
37092
by: Alexander Grigoriev | last post by:
Not quite new version of GCC that I have to use, craps with the following code: enum E; enum E { e }; That is, it doesn't accept forward declaration of enum. C++ standard text doesn't explicitly say about enum's forward declaration, but one example shows it in 18.2.1, clause 4:
0
1744
by: Vaclav Haisman | last post by:
Motivation: I have been working on some project recently that uses lots of enums with disjunctive intervals of values because it is rather convenient way to define series of constants with consecutive values. The problem is that some functions should only accept some of the ranges. To store values of more than one range/enum in variable one has to use int as storage which imho compromises type safety because any function that wants to...
6
796
by: James Brown | last post by:
Hi, I have the following enum declared: enum TOKEN { TOK_ID = 1000, TOK_NUMBER, TOK_STRING, /*lots more here*/ }; What I am trying to do is _also_ represent ASCII values 0-127 as TOKENs (this is why I started the TOKEN enum off at '1000' so I had plenty of space at the
21
4601
by: Andreas Huber | last post by:
Hi there Spending half an hour searching through the archive I haven't found a rationale for the following behavior. using System; // note the missing Flags attribute enum Color {
18
11368
by: Visual Systems AB \(Martin Arvidsson\) | last post by:
Hi! I have created an enum list like this: enum myEnum : int { This = 2, That, NewVal = 10, LastItm
13
12392
by: Don | last post by:
How do I get an Enum's type using only the Enum name? e.g. Dim enumType as System.Type Dim enumName as String = "MyEnum" enumType = ???(enumName)
10
23608
by: kar1107 | last post by:
Hi all, Can the compiler chose the type of an enum to be signed or unsigned int? I thought it must be int; looks like it changes based on the assigned values. Below if I don't initialize FOO_STORE to be, say -10, I get a warning about unsigned comparison and I'm seeing an infinite loop. If I do initialize FOO_STORE = -10, I don't see any warnings. No infinite loop.
8
1934
by: tony | last post by:
Hello! I have below a for loop and a switch in the for loop. I have also a enum called colBlowStep with some values. I have also an array called m_columnBlowStep with some strings. All items in the array m_columnBlowStep is string because I have used ToString on each enum item as you can see. I want to use enum in the case statment in the switch. I know I can use string but I rather want to use enum.
13
18151
by: toton | last post by:
Hi, I have some enum (enumeration ) defined in some namespace, not inside class. How to use the enum constant's in some other namespace without using the whole namespace. To say in little detail, the enum is declared as, namespace test{ enum MyEnum{ VALUE1,VALUE2 };
3
12271
by: Cmtk Software | last post by:
I'm trying to define an enum which will be used from unmanaged c++, C++/CLI managed c++ and from C#. I defined the following enum in a VS dll project set to be compiled with the /clr switch: public enum Days { Sunday };
0
9566
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9393
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6646
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5272
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5413
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3921
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3530
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2800
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.