hope you all doing great, so the problem occurs when I call a static method on a different form, this is the method I'm calling
public static void UpdateUI(int _index)
{
PictureBox_VehiclePicture.Image = VehicleList[_index].Image;
Label_VehicleName.Text = VehicleList[_index].Modelname;
Label_VehicleID_Info.Text = VehicleList[_index].Modelid.ToString();
Label_VehicleType_Info.Text = VehicleList[_index].Type;
Label_VehicleClass_Info.Text = VehicleList[_index].Class;
Label_VehicleAnim_Info.Text = VehicleList[_index].Anim;
ListBox_VehicleList.SelectedIndex = _index;
}
This is where I call it
private void Button_VehicleID_Click(object sender, EventArgs e)
{
this.Close();
Form_Vehicle._index = int.Parse(NumericUpDown_VehicleID.Value.ToString());
Form_Vehicle.UpdateUI(Form_Vehicle._index);
}
These are the errors
**PictureBox_VehiclePicture**.Image = VehicleList[_index].Image; **Label_VehicleName**.Text = VehicleList[_index].Modelname; **Label_VehicleID_Info**.Text = VehicleList[_index].Modelid.ToString(); **Label_VehicleType_Info**.Text = VehicleList[_index].Type; **Label_VehicleClass_Info**.Text = VehicleList[_index].Class; **Label_VehicleAnim_Info**.Text = VehicleList[_index].Anim; **ListBox_VehicleList**.SelectedIndex = _index;