Created
April 8, 2017 03:53
-
-
Save entriphy/109b3cacc3bb1085c47a3455b646928b to your computer and use it in GitHub Desktop.
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 void ExtractZip(string zipFile, string extractDirectory = "") | |
| { | |
| string zipPath = Path.GetFullPath(zipFile); | |
| string zipName = Path.GetFileName(zipPath); | |
| if (extractDirectory == "") | |
| { | |
| extractDirectory = Path.GetDirectoryName(zipFile) + @"\" + zipName.Replace(".zip", ""); | |
| } | |
| ZipFile.ExtractToDirectory(zipPath, extractDirectory); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment