I was wondering if someone could help, I am relatively new to programming C#, here is the code that is causing a StackOverflowException:
private void createButton_Click(object sender, RoutedEventArgs e)
{
try
{
MeWhoService.Account NewAccount = new MeWhoService.Account();
NewAccount.AccountID = Guid.NewGuid();
NewAccount.LastName = LastNameTextBox.Text.Trim();
NewAccount.FirstName = FirstNameTextBox.Text.Trim();
NewAccount.EmailAddress = EMailAddressTextBox.Text.Trim();
NewAccount.Password = PasswordTextBox.Password.Trim();
NewAccount.ConfirmPassword = ConfirmPasswordTextBox.Password.Trim();
// Set Password
if (ValidatePassword())
{
NewAccount.Password = PasswordTextBox.Password.Trim();
viewModel.Create(NewAccount);
NavigationService.Navigate(App.MeAndWhoUri);
}
else
{
MessageBox.Show("Your Passwords don't match.");
}
}
catch (Exception excp)
{
MessageBox.Show(excp.Message);
}
}