Trying to reduce code duplication

This commit is contained in:
2020-09-03 23:34:04 +01:00
parent 47d0a047a5
commit d728dbe272
4 changed files with 35 additions and 23 deletions
+1 -2
View File
@@ -309,8 +309,7 @@ namespace ASCOM.Meade.net
//Returns: sHH# or sHH.H#
//The number of decimal hours to add to local time to convert it to UTC. If the number is a whole number the
//sHH# form is returned, otherwise the longer form is returned.
double utcOffsetHours;
if (!double.TryParse(utcOffSet, out utcOffsetHours))
if (!double.TryParse(utcOffSet, out var utcOffsetHours))
{
var message = "Unable to decode response from the telescope, This is likely a hardware serial communications error.";
traceLogger.LogIssue("Connect", message);