I’m sure this is straightforward but I cannot find the correct string to get a google result. In VB.NET what is the difference between = (equals sign) and := (colon followed by equals sign)?
Share
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.
The := operator is used to pass arguments by name in VB.Net. For instance take the following code
If you look strictly at the types involved here I’ve passed the values out of order. But Because I bound the arguments by name using :=, the compiler will properly pass the values.
The = operator depends on the context in VB.Net. It can be either an assignment or comparison operator. For instance