Fixed ArgumentExceptions

This commit is contained in:
ClemensF 2021-02-11 23:34:37 +01:00
parent 87ff5043f6
commit d4f5456dd5
10 changed files with 36 additions and 35 deletions

View file

@ -39,7 +39,7 @@ namespace MapControl.Projections
get { return coordinateSystem; }
set
{
coordinateSystem = value ?? throw new ArgumentNullException("The property value must not be null.");
coordinateSystem = value ?? throw new ArgumentNullException(nameof(value));
var transformFactory = new CoordinateTransformationFactory();

View file

@ -40,7 +40,7 @@ namespace MapControl.Projections
{
if (zoneNumber < 1 || zoneNumber > 61)
{
throw new ArgumentException("Invalid UTM zone number.");
throw new ArgumentException("Invalid UTM zone number.", nameof(zoneNumber));
}
var zoneName = zoneNumber.ToString() + (north ? "N" : "S");