UpButton and DownButton, and methods to actually perform an increment and decrement operation, not to determine what button was pressed.
What you can do is make use of the NumericUpDown.Tag to hold a copy of the value and use it for comparison on a ValueChangeEvent, this negates the need to make use of any local instance variables.
What you would do is on the Form initialisation is set the Tag to equal the Value and then use it for comparison later;
public Form1()
{
InitializeComponent();
numericUpDown1.Tag = numericUpDown1.Value;
}
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
decimal newValue = numericUpDown1.Value;
decimal oldValue = (decimal)numericUpDown1.Tag;
if (newValue > oldValue )
{
}
else
{
if (newValue.Equals(oldValue))
{
}
else
{
}
}
numericUpDown1.Tag = numericUpDown1.Value;
}