ger21 wrote:It's VB.NET, so the functions are the same, but the syntax is different.
If you've programmed in VB, but not VB.NET, you may struggle with the syntax.
Here are two examples that do the same thing.
VB
- Code: Select all
#VB
MessageBox.Show("VB")
dim xval as double
xval = AS3.Getfield(226)
MessageBox.Show(xval)
If xval =0 then
MessageBox.Show ( "X axis is already at zero.")
Else
AS3.SetField(0, 226)
AS3.Validatefield(226)
MessageBox.Show ( "X axis reset to zero.")
End If
C#
- Code: Select all
MessageBox.Show("C#");
double xval;
xval = AS3.Getfielddouble(226);
MessageBox.Show(Convert.ToString(xval));
if (xval == 0)
{
MessageBox.Show("X axis is already at zero.");
}
else
{
AS3.Setfield(0, 226);
AS3.Validatefield(226);
MessageBox.Show("X axis reset to zero.");
}
Yup, totally missed that...LOL. No VB.net here....thanks for pointing that out. I'm already started down the C# rabbit hole, no point in heading down another.
Thanks