Index: src/Common/NetTopologySuite/IO/MyShapeFileReader.cs =================================================================== diff -u -r5fc71a385897af92ccb092f2f969b5709afab85a -r98a7464aa2f9a8163979b8a9d5ac617e412ba3a0 --- src/Common/NetTopologySuite/IO/MyShapeFileReader.cs (.../MyShapeFileReader.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a) +++ src/Common/NetTopologySuite/IO/MyShapeFileReader.cs (.../MyShapeFileReader.cs) (revision 98a7464aa2f9a8163979b8a9d5ac617e412ba3a0) @@ -187,14 +187,7 @@ indexParts = shapeReader.ReadIndexParts(leReader, numParts); ICoordinate[] coordinates = shapeReader.ReadCoordinates(leReader, numPoints); - if (numParts == 1) - { - list.Add(shapeReader.CreateLineString(coordinates)); - } - else - { - list.Add(shapeReader.CreateMultiLineString(numPoints, indexParts, coordinates)); - } + list.Add(numParts == 1 ? shapeReader.CreateLineString(coordinates) : shapeReader.CreateMultiLineString(numPoints, indexParts, coordinates)); } } } @@ -232,14 +225,7 @@ indexParts = shapeReader.ReadIndexParts(reader, numParts); ICoordinate[] coordinates = shapeReader.ReadCoordinates(reader, numPoints); - if (numParts == 1) - { - list.Add(shapeReader.CreateSimpleSinglePolygon(coordinates)); - } - else - { - list.Add(shapeReader.CreateSingleOrMultiPolygon(numPoints, indexParts, coordinates)); - } + list.Add(numParts == 1 ? shapeReader.CreateSimpleSinglePolygon(coordinates) : shapeReader.CreateSingleOrMultiPolygon(numPoints, indexParts, coordinates)); } } }