How to save GridPositions to a text file.

I’m in the making of a simple tower defense game, for this I need to make waypoints for the enemies to follow. I already made it so I can save my maps (different gras types) to a text file, but how do I save different coordinates to a save file while keeping the order?

My maps are based on a grid, so I need to store coordinates like 3,4-6,7-8,9.

How do I store/read them the best way?

PS I do it in C#

Hello,

The most used format for that are JSON, XML or CSV.

I would use JSON but you can still write a file with your own rules too.