Export data from matrix to txt file
As I correctly understood, you want to export matrix in text file.
If its true, your code contains some mistakes:

for (int j = 0; j &lt; matrix.GetLength(1) - 1; j++)


should be without decreasing length by 1 and Console.WriteLine("\n");
should be sw.WriteLine();

Also there is a not good idea to ask user to write a path. You could try to use SaveFileDialog instead. 

Full solution 

class Program
{
    [STAThread]
    static void Main(string[] args)
    {
        int[,] matrix = new int[3, 2]
        {
            {1, 2},
            {3, 4},
            {5, 6}
        };
        ExportData(matrix);
    }
    private static void ExportData(int[,] matrix)
    {
        var saveFileDialog = new SaveFileDialog
        {
            Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*",
            FileName = "export.txt"
        };

        if (saveFileDialog.ShowDialog() == DialogResult.OK)
        {
            using (StreamWriter streamWriter = new StreamWriter(saveFileDialog.FileName))
            {
                for(int i = 0; i &lt; matrix.GetLength(0); i++)
                {
                    for(int j = 0; j&lt; matrix.GetLength(1); j++)
                    {
                        streamWriter.Write($"\t{matrix[i, j]}\t");
                    }
                    streamWriter.WriteLine();
                }
            }
        }
    }
}


Just don't forget to add reference to System.Windows.Forms