Skip to content

Commit

Permalink
Another bool.Parse to bool.TryParse
Browse files Browse the repository at this point in the history
  • Loading branch information
juvander committed Nov 14, 2018
1 parent fa15575 commit ccc26d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Settings.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,10 @@ private void Page_Load(System.Object sender, System.EventArgs e)
cbxEmailOnComment.Checked = false;
}


if (!string.IsNullOrEmpty(Convert.ToString(settings["EmailOnDownload"])))
bool emailOnDownload = false;
if (bool.TryParse(settings["EmailOnDownload"].ToString(), out emailOnDownload) == true)
{
cbxEmailOnDownload.Checked = bool.Parse(settings["EmailOnDownload"].ToString());
cbxEmailOnDownload.Checked = emailOnDownload;
}
else
{
Expand Down

0 comments on commit ccc26d1

Please sign in to comment.