mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 14:08:32 +00:00
Use C# 7
This commit is contained in:
parent
3ffb613f80
commit
310f0cca9a
21 changed files with 51 additions and 86 deletions
|
|
@ -38,12 +38,7 @@ namespace MapControl.Projections
|
|||
get { return coordinateSystem; }
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new ArgumentNullException("The property value must not be null.");
|
||||
}
|
||||
|
||||
coordinateSystem = value;
|
||||
coordinateSystem = value ?? throw new ArgumentNullException("The property value must not be null.");
|
||||
|
||||
var transformFactory = new CoordinateTransformationFactory();
|
||||
|
||||
|
|
|
|||
|
|
@ -24,10 +24,9 @@ namespace MapControl.Projections
|
|||
}
|
||||
|
||||
var hemisphere = value[value.Length - 1];
|
||||
int zoneNumber;
|
||||
|
||||
if ((hemisphere != 'N' && hemisphere != 'S') ||
|
||||
!int.TryParse(value.Substring(0, value.Length - 1), out zoneNumber))
|
||||
!int.TryParse(value.Substring(0, value.Length - 1), out int zoneNumber))
|
||||
{
|
||||
throw new ArgumentException("Invalid UTM zone.");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue