|
-
Jun 19th, 2003, 11:08 AM
#1
Thread Starter
Sleep mode
Using const (hex value) .[Resolved]
How can I declare this in C# ?
Code:
private const LB_FINDSTRING = &H18F;
. It gives error says : "Identifier expected" (under equal sign !)
Last edited by Pirate; Jun 19th, 2003 at 07:22 PM.
-
Jun 19th, 2003, 12:32 PM
#2
New Member
your need to say:
private const int LB_FINDSTRING = [HEXADECIMAL];
Of course [HEXADECIMAL] being the hexadecimal you are going to use to set the variable
-
Jun 19th, 2003, 12:57 PM
#3
the hex prefix in C# is 0x, not &H like VB.
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
Jun 19th, 2003, 04:13 PM
#4
Code:
public const int LB_FINDSTRING = 0x18F;
you can convert any vb const by replacing the &H with 0x
here's 3 random examples i run in a C# form and there vb formats :
Code:
public const int PBM_SETBKCOLOR = 0x2001;
public const int PBM_SETBARCOLOR = 0x409;
public const int WM_CLOSE = 0x10;
'/// C# / C++ use this format 0x
'///
Private Const PBM_SETBKCOLOR As Long = &H2001
Private Const PBM_SETBARCOLOR As Long = &H409
Private Const WM_CLOSE As Long = &H10
'/// these are the vb versions.
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
-
Jun 19th, 2003, 06:27 PM
#5
Thread Starter
Sleep mode
Thanks for the little rule guys , worked perfect .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|