= is a comparison and a set operator, but := is just a set operator.
Compare: If 7 = 7 Then ...
Set: Dim myInt As Integer = 7
Let's say you have a custom object called SuperList whose constructor takes a variable called initialCount , then you can do things like:
Dim myList As New SuperList(initialCount:=10)
Sometimes it is easier to read the constructor when you know what values you are setting, especially if you have a constructor like SomeConstructor(12, 432, True, False, 32)
It makes sense to see SomeConstructor(monthsInYear:=12, daysInYear:=432, leapYears:True, leapDays:=False, daysInMonth:=32)
There are probably more, but this is what I got off my head.
Cᴏʀʏ
source share