Possible Duplicate:
What is the use of the := syntax?
I’ve tried hunting down the MDSN documentation for := in VB.NET as well as scoured Google only to be linked to a dead MSDN page… What would the purpose of := be?
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.
It strongly names arguments, allowing you to call a method with arguments in an order other than that specified in the method definition.
For example:
can be called with the order of the arguments reversed by using their names:
prints:
This is especially useful when you have a long list of optional arguments, you only want to specify a few of them, and those that you want to specify are not the first ones.