-
Recent Posts
-
Recent Comments
Archives
- January 2021
- December 2020
- November 2020
- October 2020
- September 2020
- August 2020
- July 2020
- June 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- October 2019
- September 2019
- August 2019
- July 2019
- June 2019
- May 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- September 2018
- August 2018
- July 2018
- June 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- September 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- February 2014
- January 2014
- December 2013
- October 2013
- August 2013
- June 2013
- December 2012
- September 2012
- July 2012
- June 2012
- November 2011
- May 2011
- April 2011
- February 2011
- December 2010
Categories
- .NET
- 3D
- 3D graphics
- ADO.NET
- algorithms
- animation
- API
- arrays
- attributes
- audio
- books
- C#
- C# programming
- calculations
- challenges
- classes
- clipboard
- coding
- combinatorics
- console
- controls
- cryptography
- curve fitting
- database
- debugging
- dialogs
- directories
- Drag and Drop
- drawing
- drawings
- enums
- Event
- events
- example program
- Excel
- extension methods
- extensions
- files
- finance
- fonts
- formatting
- forms
- fractals
- ftp
- games
- GDI+
- generic
- geometry
- globalization
- graphics
- html
- IDE
- image processing
- inheritance
- interfaces
- internationalization
- internet
- interoperability
- LINQ
- lists
- localization
- mathematics
- memory
- menus
- MessageBox
- methods
- miscellany
- multimedia
- network
- Office
- OOP
- operators
- parsing
- performance
- phone
- PowerPoint
- printers
- printing
- productivity
- programs
- puzzles
- recursion
- reflection
- registry
- regular expressions
- serialization
- settings
- SQL
- stories
- strings
- syntax
- system
- threading
- three-dimensional graphics
- tips
- tools
- transformations
- Uncategorized
- user interface
- variables
- VBA
- web
- Windows Forms programming
- WMI
- Word
- wpf
- XAML
- XML
Meta
Tag Archives: directories
New Book: The Modern C# Challenge
My latest book, The Modern C# Challenge, is now available. It’s a collection of 100 programming challenges that let you test your ability in a wide variety of programming topics, many of which are not usually covered in traditional programming … Continue reading
Posted in algorithms, books, files, mathematics, puzzles
Tagged algorithms, books, C#, C# programming, combinations, cryptography, directories, dynamic programming, example, example program, factors, files, geometry, mathematics, permutations, prime factors, puzzles, randomization, recursion, simulations, statistics, The Modern C# Challenge, Windows Forms programming, yield
1 Comment
Merge directories in C#
This example lets you merge directories. Once upon a time, if you used Windows Explorer to move a file from one directory to another and the destination directory already contained a file with that name, you had the option of … Continue reading
Posted in directories, files, system, tools
Tagged C#, C# programming, copy files, directories, example, example program, File Explorer, files, merge directories, merge files, move files, system, tools, Windows Explorer, Windows Forms programming
Leave a comment
Compress and decompress directories in C#
The ZipFile class provides remarkably simple methods to compress and decompress directories in the zip format. This class is defined in the .NET Framework version 4.5, so this example is in Visual Studio 2017 instead of an older version. To … Continue reading
Posted in classes, directories, files
Tagged C#, C# programming, classes, compress, compress and decompress directories, compress directories, compress files, compressions, decompress, directories, example, example program, files, uncompress, unzip, Windows Forms programming, Zip, zip directories, zip files, ZipFile
Leave a comment
Use Word to make a PDF containing pictures in C#
The example Make a Word document containing pictures in C# shows how to make a Word document containing pictures taken from selected files. This example is similar to the that one (see that post for details) except it saves the … Continue reading
Posted in files, graphics, interoperability, Office, Word
Tagged C#, C# programming, directories, example, example program, files, graphics, image, interoperability, make PEF, Microsoft Office, Microsoft Word, Office, PEF, picture, Windows Forms programming, Word
Leave a comment
Make a Word document containing pictures in C#
Occasionally you may want to combine selected pictures to make a Word document. This example shows one way you can search for files matching a pattern and then add them to a new Word document. This is a fairly long … Continue reading
Posted in files, graphics, interoperability, Office, Word
Tagged C#, C# programming, directories, example, example program, files, graphics, image, interoperability, Microsoft Office, Microsoft Word, Office, picture, Windows Forms programming, Word
6 Comments
Initialize a TreeView control to display a directory hierarchy in C#
This example adds the following LoadFromDirectory extension method to the TreeView control. // Initialize the TreeView from a directory, // its subdirectories, and their files. public static void LoadFromDirectory(this TreeView trv, string directory, int folder_img, int file_img) { DirectoryInfo dir_info … Continue reading
Find files in the startup directory in C#
In some programs you may want to find files that were installed with the program. One way to do that is to put the files in the program’s installation directory. Open the Project menu, select Add Existing Item, find the … Continue reading
Create a directory and intermediate directories in C#
The System.IO.Directory class’s CreateDirectory method creates a directory. If the directory’s path includes missing intermediate directories, it creates them, too. For example, if C:\DirA is empty and you use CreateDirectory to create C:\DirA\DirB\DirC, then the method automatically creates DirB as … Continue reading
Let the user select a folder in C#
This example demonstrates two handy techniques. First, it lets you select a folder. When you click the program’s ellipsis button, the following code displays a FolderBrowserDialog. This lets the user pick a directory instead of needing to type it in. … Continue reading
Posted in directories, files, system
Tagged C#, C# programming, directories, directory, example, example program, files, folder, select a folder, select directory, select folder, system, Windows Forms programming
Leave a comment