argumentnullexception: Value cannot be null. (Parameter 'path1')System.IO.Path.Combine(string path1, string path2) code example

Example: system.io Path Combine

namespace: System.IO

//c#

var folder = "C:\temp";
var fileName = "note.txt";
var completePath = Path.Combine(folder, filename);
//return: "C:\temp\note.txt"

//vb
Dim folder As String = "C:\temp";
Dim fileName As String = "note.txt";
Dim completePath As String = Path.Combine(folder, filename);
//return: "C:\temp\note.txt"

Tags:

Misc Example