I have a Window handle Picker and it says my handle is 0094167C.
When I declare the variable in c# the letter in this code gives an error.
How to declare?
public const IntPtr WinHandle = 0094167C;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You know that the handle will typically change with each application and/or system start? This means your constant is subject to failure anyway.
If, however, you really want to assign a constant other than zero to an
IntPtr(which would beIntPtr.Zero), the documentation states that there are constructors that takeInt32,Int64orVoid*as parameter.