I’m a little confused.
In the code:
[DllImport("library.dll")]
public static extern void function(int x);
why is the x required? Shouldn’t the int be enough as this is just a definition and not a declaration?
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.
Its the C# Syntax, the same goes for methods in interface.
Probably the biggest reason is, that it adds clarity to the code. Parameter name may tells about the expected value in method