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 CloneDirectory(string root, string dest) | |
| { | |
| foreach (var directory in Directory.GetDirectories(root)) | |
| { | |
| var dirName = Path.GetFileName(directory); | |
| if (!Directory.Exists(Path.Combine(dest, dirName))) | |
| { | |
| Directory.CreateDirectory(Path.Combine(dest, dirName)); | |
| } | |
| CloneDirectory(directory, Path.Combine(dest, dirName)); |
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
| var root = new DirectoryInfo(rootPath); | |
| foreach (var file in root.GetFiles()) | |
| { | |
| File.Copy(file.FullName, "DestinationFolder\" + file.Name, true); | |
| } |
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
| var task = Task.Run(() => LongMethodAsync()); |
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
| using (Stream stream = this.GetType().Assembly.GetManifestResourceStream("App.Resources." + "File.ext")) | |
| { | |
| if (stream == null) | |
| { | |
| throw new ArgumentException("No such resource", "File.ext"); | |
| } | |
| using (Stream output = File.OpenWrite(currentAnalysisPath + $@"\Resources\File.ext")) | |
| { | |
| stream.CopyTo(output); | |
| } |
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
| Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; | |
| var ci = (CultureInfo)CultureInfo.CurrentCulture.Clone(); | |
| ci.NumberFormat.NumberDecimalSeparator = "."; |
NewerOlder