Pergunta de entrevista da empresa SAP Concur

Write code to covert user input to an integer if possible. Solution must handle negative inputs and you cannot use string.ToInt() or any variation.