Managing Files in C# (Page 1 of 5 )
If you found this article, that means I don’t need to introduce the purpose of computer files. As a programmer, you’ll find that managing files is required almost everywhere regardless of the project. Working with files is really important because they store data. In this tutorial, we’re going to learn how we can copy, move, rename, delete, and grab the file attributes of a file, as the title suggests, in C#.
Throughout this tutorial, I will assume that the reader is familiar with the syntax of C# and, therefore, will only explain in detail what each "new" function does and how to use them appropriately. Our project will use file managing functions as examples so that we will have some "real-world" proof of what they do as an end-result.
The style of this article will be intuitive and pretty straightforward. I'm going to paste code snippets from the project and explain what these blocks of code mean. If it's a function, then I'll analyze its parameters, arguments, and so forth. Following along shouldn't be hard at all because we won't adopt a fast pace.
We are going to finish this tutorial by attaching the archived source of this project. You may download it, see how it works, fiddle with it, and find out what you have missed or done wrong if you were struggling to make your application run. To clarify any confusion, I'll show you a screen shot at the beginning that points out the way I named the form components. This way, we can both work accordingly.
This being said, I think we should move on. Launch Visual Studio and turn the page.
Next: The Foundations >>
More C# Articles
More By Barzan "Tony" Antal