Created
September 13, 2011 18:54
-
-
Save anonymous/1214699 to your computer and use it in GitHub Desktop.
if elif madness
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string UrlDecode(string s) | |
{ | |
#if WINDOWS_PHONE | |
return System.Net.HttpUtility.UrlDecode(s); | |
#elif SILVERLIGHT | |
return System.Windows.Browser.HttpUtility.UrlDecode(s); | |
#else | |
// Since HttpUtility.UrlDecode doesn't exist in Client Framework | |
// get it from Mono. | |
// Thank god, mono libraries are licensed under MIT. | |
return UrlDecode(s, Encoding.UTF8); | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment