Method IsSamePath
IsSamePath(FileSystemInfo, FileSystemInfo)
Checks if the two provided paths are the same.
Declaration
public static bool IsSamePath(FileSystemInfo first, FileSystemInfo second)
Parameters
Type | Name | Description |
---|---|---|
FileSystemInfo | first | First path to compare. |
FileSystemInfo | second | Second path to compare. |
Returns
Type | Description |
---|---|
bool | Boolean value indicating whether the two paths are the same. |
Examples
IsSamePath("C:\\temp\\file.txt", "C:/temp/file.txt"); //Returns true
IsSamePath(string, string)
Checks if the two provided paths are the same.
Declaration
public static bool IsSamePath(string first, string second)
Parameters
Type | Name | Description |
---|---|---|
string | first | First path to compare. |
string | second | Second path to compare. |
Returns
Type | Description |
---|---|
bool | Boolean value indicating whether the two paths are the same. |
Examples
IsSamePath("C:\\temp\\file.txt", "C:/temp/file.txt"); //Returns true