vb Code:
  1. decimal.tryparse(principalTextBox.Text, principal) 'converts string to decimal
  2. rate = cdbl(NumericUpDown.Value)