private void SendSMS_Click(object sender, RoutedEventArgs e) { try { var result = sms.SendMessage(smsinfo); MessageBox.Show($"{result.Code} : {result.Message}"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }