I notice that the sample doesn't create a MultiPolygon anything. It is just creating a series of polygons. Is that what you needed?
I would expect using a MultiPolygon to look more like
const int NumberOfPolygons = 100;
Random rnd = new Random();
var polygonList = new List<Polygon>();
using (FeatureSet fs = new FeatureSet(FeatureType.Polygon))
{
for (int i = 0; i < NumberOfPolygons; i++)
{
const int NumberOfCoordinates = 50;
Coordinate center = new Coordinate((rnd.Next(50) * 360)  180, (rnd.Next(60) * 180)  90);
Coordinate[] coord = new Coordinate[NumberOfCoordinates];
for (int ii = 0; ii < NumberOfCoordinates; ii++)
{
coord[ii] = new Coordinate(center.X + Math.Cos((ii * 10) * Math.PI / 10), center.Y + (ii * 10) * Math.PI / 10);
}
var polygon = new Polygon(coord);
polygonList.Add(polygon);
}
fs.Features.Add(new MultiPolygon(polygonList.ToArray()));
fs.SaveAs("C:\\test.shp", true);
}
I did run the following code which creates a number of polygons several ties without problems
const int NumberOfPolygons = 100;
Random rnd = new Random();
using (FeatureSet fs = new FeatureSet(FeatureType.Polygon))
{
for (int i = 0; i < NumberOfPolygons; i++)
{
const int NumberOfCoordinates = 50;
Coordinate center = new Coordinate((rnd.Next(50) * 360)  180, (rnd.Next(60) * 180)  90);
Coordinate[] coord = new Coordinate[NumberOfCoordinates];
for (int ii = 0; ii < NumberOfCoordinates; ii++)
{
coord[ii] = new Coordinate(center.X + Math.Cos((ii * 10) * Math.PI / 10), center.Y + (ii * 10) * Math.PI / 10);
}
var polygon = new Polygon(coord);
fs.Features.Add(polygon);
}
fs.SaveAs("C:\\test2.shp", true);
}
