I guess the question is really about how to define a type as an existing primitive data type. Below clearly doesn’t work, but I think you’ll get the idea.
Type DWORD = typeof(UInt32); private DWORD func1(int x) { return 123; }
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.
There is no
typedefin C#. You can’t use#definemacros to replace strings either (they are just conditional). The only rough equivalent isusing DWORD = System.UInt32;on top of your source file.