例 次の例では、文字列の配列をパスに結合します。 string[] paths = {@"d:\archives", "2001", "media", "images"}; string fullPath = Path.Combine(paths); Console.WriteLine(fullPath); Dim paths As String() = {"d:\archives", "2001", "media", "images"} Dim fullPath As String = Path.Combine(paths) Console.WriteLine(fullPath) 注釈 paths は、結合するパスの部分の配列である必要があります。 後続のパスの 1 つが絶対パスの場合、結合操作は、その絶対パスから開始してリセットされ、以前に結合されたすべてのパスが破棄されます。 内のい
![Path.Combine メソッド (System.IO)](https://cdn-ak-scissors.b.st-hatena.com/image/square/d6e4cb632c7025e9f5e05fd314fbf6dcd6144e8d/height=288;version=1;width=512/https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fmedia%2Fopen-graph-image.png)