I’m new to Silverlight and used to code in VB.Net before. Now I’m trying to assign RepeatButtons’ Interval values in a single statement but it sets zero.
rbtUp.Interval = rbtLeft.Interval = rbtCenter.Interval = rbtRight.Interval
= rbtDown.Interval = interval
This works fine in c# but not in vb.net.
You’re confusing VB.Net with C#.
You can’t do what you’re trying to do in VB.Net. You need to write multiple statements:
What happens in your case is that only the first equals sign is the assignment operator, the subsequent ones is the comparison operator. In equivalent C# it would be like this:
Which is clearly not what you wanted to do.
It also looks like you don’t have Option Strict turned on (since the comparison operator returns a Boolean and Interval is likely an Integer, your code should show a compiler error with Option Strict On when assigning a Boolean to an Integer).