Skip to content

Instantly share code, notes, and snippets.

@kmorcinek
Created July 8, 2012 14:14
Show Gist options
  • Save kmorcinek/3071142 to your computer and use it in GitHub Desktop.
Save kmorcinek/3071142 to your computer and use it in GitHub Desktop.
Usefull functions for C#
using System;
using System.IO;
public static class PathHelper
{
public static bool AreEqualPath(string first, string second)
{
return String.Compare(
Path.GetFullPath(first).TrimEnd('\\'),
Path.GetFullPath(second).TrimEnd('\\'),
StringComparison.InvariantCultureIgnoreCase) == 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment