title
C# Tutorial 17 File I/O
description
Get the Code Here : https://goo.gl/xFdH0u
Best C# Book : http://amzn.to/2iMArkU
Support me on Patreon : https://www.patreon.com/derekbanas
This part of my C# tutorial is based completely on File I/O. We'll learn how to Mess with Directories, Use File to Read and Write to Files, Get File Info, Use FileStream, Use StreamWriter, Use BinaryWriter & BinaryReader, and much more.
For best results take notes on the cheat sheet provided above as you watch and leave any questions you have.
Thank you to Patreon supporters like the following for helping me make this video
facebook.com/cottageindustriesbuild/
jaryd remillard : instagram: @distant_admiration
bugreplay.com
@kyleaisho
@thetwistedhat
vjFaLk
jaryd remillard : https://github.com/YearOfProgramming/2017Challenges
detail
{'title': 'C# Tutorial 17 File I/O', 'heatmap': [{'end': 207.261, 'start': 171.255, 'weight': 1}, {'end': 413.166, 'start': 397.982, 'weight': 0.834}], 'summary': 'Tutorial on c# file i.o. covers file system, directory operations, file reading and writing, file streams, stream writers, binary data operations, and examples of accessing, creating, and deleting directories, emphasizing various operations and usage, with practical demonstrations and examples.', 'chapters': [{'end': 33.941, 'segs': [{'end': 33.941, 'src': 'embed', 'start': 0.589, 'weight': 0, 'content': [{'end': 4.472, 'text': 'Well hello internet and welcome to part 17 of my C Sharp video tutorial.', 'start': 0.589, 'duration': 3.883}, {'end': 6.914, 'text': "We're going to be covering a ton of things in this tutorial.", 'start': 4.492, 'duration': 2.422}, {'end': 13.479, 'text': "We're going to first off cover the file system file directory, info, file info, file stream, stream writer, stream reader,", 'start': 6.954, 'duration': 6.525}, {'end': 15.34, 'text': 'binary writer and binary reader.', 'start': 13.479, 'duration': 1.861}, {'end': 17.382, 'text': 'So a whole ton of file I.O.', 'start': 15.38, 'duration': 2.002}, {'end': 24.787, 'text': 'And, like always, all the code, as well as a transcript of this video, is available in the description underneath this video, and I have a lot to do,', 'start': 17.662, 'duration': 7.125}, {'end': 25.708, 'text': "so let's get into it.", 'start': 24.787, 'duration': 0.921}, {'end': 33.941, 'text': "Okay, so here we are and you're going to need these two libraries right here to be able to have everything work,", 'start': 26.658, 'duration': 7.283}], 'summary': 'Part 17 of c sharp tutorial covers file i.o with multiple libraries and resources available.', 'duration': 33.352, 'max_score': 0.589, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY589.jpg'}], 'start': 0.589, 'title': 'C# file i.o. tutorial', 'summary': 'Covers c# file i.o. topics like file system, file directory, file info, file stream, stream writer, stream reader, binary writer, and binary reader. all code and transcript are available in the video description.', 'chapters': [{'end': 33.941, 'start': 0.589, 'title': 'C# file i.o. tutorial - part 17', 'summary': 'Covers a wide range of topics including file system file directory, info, file info, file stream, stream writer, stream reader, binary writer, and binary reader in the c sharp video tutorial. all the code and transcript of the video are available in the description underneath the video.', 'duration': 33.352, 'highlights': ['The tutorial covers file system file directory, info, file info, file stream, stream writer, stream reader, binary writer, and binary reader in C Sharp.', 'All the code and transcript of the video are available in the description underneath the video.']}], 'duration': 33.352, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY589.jpg', 'highlights': ['The tutorial covers file system file directory, info, file info, file stream, stream writer, stream reader, binary writer, and binary reader in C Sharp.', 'All the code and transcript of the video are available in the description underneath the video.']}, {'end': 251.337, 'segs': [{'end': 128.243, 'src': 'embed', 'start': 33.941, 'weight': 0, 'content': [{'end': 42.704, 'text': "and you also may need to go into Windows and here's Visual Studio, it's 2017, or you can use Xamarin, whatever you want to use,", 'start': 33.941, 'duration': 8.763}, {'end': 49.427, 'text': 'but you may find that you need to log in as Administrator, and how you do that is, go to More and then run as Administrator.', 'start': 42.704, 'duration': 6.723}, {'end': 54.769, 'text': "Okay, but that's all for that, and everything should work the way I have everything set up here.", 'start': 49.627, 'duration': 5.142}, {'end': 59.302, 'text': "Now what I'm going to do first off is talk about how to mess around with directories.", 'start': 55.14, 'duration': 4.162}, {'end': 62.883, 'text': 'And if you want to get access to your current directory,', 'start': 59.782, 'duration': 3.101}, {'end': 75.948, 'text': "what you can do is go directory info and let's just call this current directory and you can just go new and directory info and then inside of here just put a dot.", 'start': 62.883, 'duration': 13.065}, {'end': 78.589, 'text': "Okay So that's your current directory.", 'start': 75.968, 'duration': 2.621}, {'end': 83.59, 'text': "Now, if you want to get access to another directory, you're going to do it the same type of way.", 'start': 78.769, 'duration': 4.821}, {'end': 91.213, 'text': "You're going to go directory info, and let's say Derek's directory is equal to new directory info.", 'start': 83.61, 'duration': 7.603}, {'end': 94.974, 'text': 'And then, so that you will be able to use the backslashes,', 'start': 91.693, 'duration': 3.281}, {'end': 102.077, 'text': "you're going to put an at sign inside of here and then you're going to just point to whatever directory you want to point to.", 'start': 94.974, 'duration': 7.103}, {'end': 110.241, 'text': "So I'll go to my favorite directory, which is the Derek Vance directory in users, and everybody should have one of those.", 'start': 102.197, 'duration': 8.044}, {'end': 114.816, 'text': 'So What else can we do? Well, we can get our directory path.', 'start': 110.661, 'duration': 4.155}, {'end': 119.058, 'text': "So let's come in here and let's output that information.", 'start': 115.116, 'duration': 3.942}, {'end': 124.561, 'text': "So you'll just go dirks directory like that and full name.", 'start': 119.258, 'duration': 5.303}, {'end': 126.062, 'text': "And that's going to get you that.", 'start': 124.581, 'duration': 1.481}, {'end': 128.243, 'text': "And I'm going to output all this here in a second.", 'start': 126.082, 'duration': 2.161}], 'summary': 'Using visual studio 2017 or xamarin, access directories, get current directory info, and output directory path.', 'duration': 94.302, 'max_score': 33.941, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY33941.jpg'}, {'end': 214.044, 'src': 'heatmap', 'start': 157.284, 'weight': 3, 'content': [{'end': 161.768, 'text': 'So we can go once again, directory and attributes.', 'start': 157.284, 'duration': 4.484}, {'end': 167.452, 'text': 'And is there anything else? When it was created, I mean, we can get all kinds of things.', 'start': 163.069, 'duration': 4.383}, {'end': 170.694, 'text': "I'm just covering some of the things you may actually need.", 'start': 167.492, 'duration': 3.202}, {'end': 175.698, 'text': "And don't worry, we're going to get into writing files and reading files and all that here in a second.", 'start': 171.255, 'duration': 4.443}, {'end': 176.979, 'text': 'Just want to cover this completely.', 'start': 175.758, 'duration': 1.221}, {'end': 179.616, 'text': "And that's for the most part everything.", 'start': 177.795, 'duration': 1.821}, {'end': 181.698, 'text': "So let's run that just to see what that looks like.", 'start': 179.636, 'duration': 2.062}, {'end': 185.94, 'text': 'And you can see right there all the output that we have here for that guy.', 'start': 182.058, 'duration': 3.882}, {'end': 187.541, 'text': 'Okay, so pretty cool stuff.', 'start': 185.96, 'duration': 1.581}, {'end': 190.483, 'text': "So let's go and let's do a little bit more.", 'start': 187.761, 'duration': 2.722}, {'end': 195.145, 'text': "Let's say we want to, hmm, let's create a directory.", 'start': 190.823, 'duration': 4.322}, {'end': 198.247, 'text': 'Well, we go directory info once again.', 'start': 195.485, 'duration': 2.762}, {'end': 207.261, 'text': "directory info, and i'm going to call this data directory and equal to new directory info.", 'start': 198.677, 'duration': 8.584}, {'end': 214.044, 'text': 'and then once again, the at for the backslashes, c colon and users.', 'start': 207.261, 'duration': 6.783}], 'summary': 'Covered directory and attributes, creating a directory info, and discussing reading and writing files.', 'duration': 56.76, 'max_score': 157.284, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY157284.jpg'}, {'end': 251.337, 'src': 'embed', 'start': 207.261, 'weight': 6, 'content': [{'end': 214.044, 'text': 'and then once again, the at for the backslashes, c colon and users.', 'start': 207.261, 'duration': 6.783}, {'end': 218.766, 'text': 'and i am going to put this in my derrick bannis directory.', 'start': 214.044, 'duration': 4.722}, {'end': 219.467, 'text': 'of course.', 'start': 218.766, 'duration': 0.701}, {'end': 224.569, 'text': "put it wherever you want and i'll just say c sharp data, just to do something.", 'start': 219.467, 'duration': 5.102}, {'end': 226.91, 'text': "okay, so that's going to create a directory for us.", 'start': 224.569, 'duration': 2.341}, {'end': 231.501, 'text': "And then, if you create a directory, of course you're going to want to be able to delete it.", 'start': 227.338, 'duration': 4.163}, {'end': 240.008, 'text': 'And to do that, you just go directory and whoops, directory info dot delete like that.', 'start': 231.782, 'duration': 8.226}, {'end': 243.171, 'text': "Delete And then you're going to throw in whatever you want to delete.", 'start': 240.048, 'duration': 3.123}, {'end': 245.913, 'text': 'So just the same exact thing you have right there.', 'start': 243.431, 'duration': 2.482}, {'end': 247.214, 'text': 'Paste it inside of there.', 'start': 245.993, 'duration': 1.221}, {'end': 247.974, 'text': 'And there you are.', 'start': 247.354, 'duration': 0.62}, {'end': 250.817, 'text': 'You went and created a directory and then you deleted one.', 'start': 248.054, 'duration': 2.763}, {'end': 251.337, 'text': 'All right.', 'start': 251.057, 'duration': 0.28}], 'summary': 'Demonstrating directory creation and deletion using c#.', 'duration': 44.076, 'max_score': 207.261, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY207261.jpg'}], 'start': 33.941, 'title': 'C# directory operations', 'summary': 'Covers working with directories in c#, including accessing, manipulating, and managing directories using directory info and directory classes. it provides examples of accessing, creating, and deleting directories, emphasizing various operations and usage.', 'chapters': [{'end': 102.077, 'start': 33.941, 'title': 'Working with directories in c#', 'summary': 'Demonstrates how to access directories in c# using directory info, including accessing the current directory and another directory, and emphasizes the process of running visual studio as administrator.', 'duration': 68.136, 'highlights': ['The chapter emphasizes the process of running Visual Studio as Administrator, which is necessary for certain operations, such as accessing directories or performing specific tasks.', "The chapter explains how to access the current directory in C# using Directory Info, highlighting the use of 'dot' to represent the current directory.", 'The chapter illustrates the process of accessing another directory in C# using Directory Info, particularly emphasizing the utilization of the at sign to enable the use of backslashes and pointing to the desired directory.']}, {'end': 207.261, 'start': 102.197, 'title': 'Working with directories in c#', 'summary': 'Covers various operations on directories in c#, including accessing directory paths, getting directory names, getting parent directories, and identifying file attributes, with a focus on the derek vance directory, providing a comprehensive overview of the operations.', 'duration': 105.064, 'highlights': ['Covering various operations on directories in C# The chapter provides a comprehensive overview of operations on directories in C#.', 'Accessing directory paths and getting directory names The chapter covers accessing directory paths and obtaining directory names.', 'Getting parent directories and identifying file attributes The chapter includes information on obtaining parent directories and identifying file attributes.', 'Focused on the Derek Vance directory There is a focus on operations related to the Derek Vance directory.']}, {'end': 251.337, 'start': 207.261, 'title': 'C# directory management', 'summary': "Discusses creating and deleting directories in c#, including the syntax and usage of the 'directory' and 'directoryinfo' classes, with an example of creating and deleting a directory.", 'duration': 44.076, 'highlights': ["The chapter explains creating a directory in C# using the 'Directory.CreateDirectory' method, allowing users to specify the directory name and location, providing flexibility for organizing files and data.", "It also demonstrates the deletion of a directory using the 'DirectoryInfo.Delete' method, highlighting the ease of removing directories in C# programming."]}], 'duration': 217.396, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY33941.jpg', 'highlights': ['The chapter emphasizes the process of running Visual Studio as Administrator, which is necessary for certain operations, such as accessing directories or performing specific tasks.', "The chapter explains how to access the current directory in C# using Directory Info, highlighting the use of 'dot' to represent the current directory.", 'The chapter illustrates the process of accessing another directory in C# using Directory Info, particularly emphasizing the utilization of the at sign to enable the use of backslashes and pointing to the desired directory.', 'Covering various operations on directories in C# The chapter provides a comprehensive overview of operations on directories in C#.', 'Accessing directory paths and getting directory names The chapter covers accessing directory paths and obtaining directory names.', 'Getting parent directories and identifying file attributes The chapter includes information on obtaining parent directories and identifying file attributes.', "The chapter explains creating a directory in C# using the 'Directory.CreateDirectory' method, allowing users to specify the directory name and location, providing flexibility for organizing files and data.", "It also demonstrates the deletion of a directory using the 'DirectoryInfo.Delete' method, highlighting the ease of removing directories in C# programming.", 'Focused on the Derek Vance directory There is a focus on operations related to the Derek Vance directory.']}, {'end': 594.758, 'segs': [{'end': 275.537, 'src': 'embed', 'start': 251.687, 'weight': 1, 'content': [{'end': 258.435, 'text': "And up next I'm going to get rid of this actually because I want to use this directory in my other examples that I cover here.", 'start': 251.687, 'duration': 6.748}, {'end': 262.34, 'text': "I'm going to show you a very simple way to read and write files.", 'start': 258.796, 'duration': 3.544}, {'end': 268.668, 'text': "So what we're going to do is we're going to create a string array here and I'm going to write it to a file.", 'start': 262.761, 'duration': 5.907}, {'end': 270.93, 'text': "So I'm going to go customers is equal to.", 'start': 268.708, 'duration': 2.222}, {'end': 273.594, 'text': "And let's throw a whole bunch of people in here.", 'start': 271.77, 'duration': 1.824}, {'end': 275.537, 'text': 'My favorite person, Bob Smith.', 'start': 273.654, 'duration': 1.883}], 'summary': 'Demonstrating a simple way to read and write files using a string array.', 'duration': 23.85, 'max_score': 251.687, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY251687.jpg'}, {'end': 430.006, 'src': 'heatmap', 'start': 397.982, 'weight': 0.834, 'content': [{'end': 398.863, 'text': 'And now we can run it.', 'start': 397.982, 'duration': 0.881}, {'end': 402.643, 'text': 'And you can see that it wrote that information and then it read it back out.', 'start': 399.223, 'duration': 3.42}, {'end': 404.644, 'text': 'Okay, so pretty cool stuff.', 'start': 402.663, 'duration': 1.981}, {'end': 407.364, 'text': "So that's an easy way to read and write files.", 'start': 404.664, 'duration': 2.7}, {'end': 413.166, 'text': "And now that we did that, why don't we go and get a little bit of information about our file.", 'start': 407.884, 'duration': 5.282}, {'end': 417.426, 'text': "So I'm going to go and do directory info again.", 'start': 413.366, 'duration': 4.06}, {'end': 420.167, 'text': "And I'm going to call this mydata.", 'start': 417.446, 'duration': 2.721}, {'end': 425.143, 'text': 'directory is equal to new directory info.', 'start': 420.68, 'duration': 4.463}, {'end': 430.006, 'text': "And inside of here, let's just go up here and copy this again.", 'start': 426.083, 'duration': 3.923}], 'summary': 'Demonstration of reading and writing files, followed by obtaining file information.', 'duration': 32.024, 'max_score': 397.982, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY397982.jpg'}, {'end': 519.474, 'src': 'embed', 'start': 493.864, 'weight': 0, 'content': [{'end': 505.017, 'text': 'I only have one file inside of there, but it would get all of them, and to do that I just go file info file in text files and after we do that,', 'start': 493.864, 'duration': 11.153}, {'end': 507.851, 'text': 'we can go and output some information.', 'start': 505.017, 'duration': 2.834}, {'end': 510.112, 'text': "Say we want to get the file's name.", 'start': 507.951, 'duration': 2.161}, {'end': 511.172, 'text': 'We can do that.', 'start': 510.232, 'duration': 0.94}, {'end': 515.813, 'text': 'And we could also get the number of bytes in our file.', 'start': 511.872, 'duration': 3.941}, {'end': 519.474, 'text': "And to do that, we'll just say file and length.", 'start': 516.073, 'duration': 3.401}], 'summary': 'Demonstrates accessing file information and extracting file name and size in bytes.', 'duration': 25.61, 'max_score': 493.864, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY493864.jpg'}], 'start': 251.687, 'title': 'File operations in c#', 'summary': 'Covers simple and advanced file reading, writing, and file operations in c#, including creating and writing string arrays, retrieving file information, and working with file streams, with practical demonstrations and examples.', 'chapters': [{'end': 299.785, 'start': 251.687, 'title': 'Simple file reading and writing', 'summary': 'Covers a simple way to read and write files, including creating a string array and writing it to a file, with an example of creating a file path for saving time.', 'duration': 48.098, 'highlights': ['The chapter covers a simple way to read and write files, including creating a string array and writing it to a file, with an example of creating a file path for saving time.', 'The example demonstrates creating a string array with customer names and writing it to a file.', 'The speaker mentions creating a file path to save time.']}, {'end': 404.644, 'start': 300.145, 'title': 'File writing and reading in c#', 'summary': 'Covers file writing and reading in c#, including writing an array to a file and reading strings from a file, with practical demonstrations.', 'duration': 104.499, 'highlights': ['The chapter covers writing an array to a file and reading strings from a file in C#, providing practical demonstrations.', "Demonstrates writing to a file by using 'file.writealllines' and reading from a file using 'file.readalllines'.", 'Practical demonstration includes writing an array to a file and reading strings from a file in C#.']}, {'end': 594.758, 'start': 404.664, 'title': 'File operations and file streams', 'summary': 'Covers reading and writing files, retrieving information about files in a directory, extracting text files, and outputting file names and sizes. it also discusses file streams and creating a file stream to open or create a text file.', 'duration': 190.094, 'highlights': ['The chapter covers reading and writing files, retrieving information about files in a directory, extracting text files, and outputting file names and sizes. Covers various file operations such as reading and writing files, retrieving directory information, and extracting specific file types.', "It opened and created a file for me. Demonstrates the creation of a file using file stream with the 'file open' and 'create' methods.", 'A file stream is going to be used anytime you want to be able to read and write a byte or an array of bytes. Explains the purpose of a file stream, which is used for reading and writing bytes or arrays of bytes.']}], 'duration': 343.071, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY251687.jpg', 'highlights': ['Covers various file operations such as reading and writing files, retrieving directory information, and extracting specific file types.', "Demonstrates writing to a file by using 'file.writealllines' and reading from a file using 'file.readalllines'.", 'The example demonstrates creating a string array with customer names and writing it to a file.']}, {'end': 1031.626, 'segs': [{'end': 807.887, 'src': 'embed', 'start': 762.452, 'weight': 0, 'content': [{'end': 768.418, 'text': 'And we can do that quite easily by just going encoding once again and default once again.', 'start': 762.452, 'duration': 5.966}, {'end': 773.862, 'text': "And here we're going to say instead of get byte, we're going to say that we want to get string.", 'start': 769.098, 'duration': 4.764}, {'end': 779.327, 'text': 'And we are going to use the file byte array, obviously.', 'start': 774.703, 'duration': 4.624}, {'end': 781.048, 'text': 'And we will output that.', 'start': 779.747, 'duration': 1.301}, {'end': 784.38, 'text': 'And what do I do? I forgot parentheses.', 'start': 781.909, 'duration': 2.471}, {'end': 785.061, 'text': 'There it is.', 'start': 784.52, 'duration': 0.541}, {'end': 785.721, 'text': 'Made it happy.', 'start': 785.121, 'duration': 0.6}, {'end': 790.982, 'text': "And then, of course, after we are all done using the file stream, we're going to close it.", 'start': 786.041, 'duration': 4.941}, {'end': 793.303, 'text': "So let's run it and let's see it work.", 'start': 791.482, 'duration': 1.821}, {'end': 800.345, 'text': 'And you can see that it wrote that file to or wrote that string to the file and then it received it and output it on the screen.', 'start': 793.563, 'duration': 6.782}, {'end': 802.305, 'text': "OK, so that's how we use file streams.", 'start': 800.885, 'duration': 1.42}, {'end': 807.887, 'text': 'So now what I want to do is talk about how we use a stream writer and stream readers.', 'start': 802.686, 'duration': 5.201}], 'summary': 'Demonstrates using file streams, stream writer, and stream readers for encoding and outputting data.', 'duration': 45.435, 'max_score': 762.452, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY762452.jpg'}], 'start': 595.158, 'title': 'Using file streams and stream writers', 'summary': 'Explains the use of file streams to manipulate string data through byte arrays, writing and reading from files, and utilizing stream writers in c#.', 'chapters': [{'end': 1031.626, 'start': 595.158, 'title': 'Using file streams and stream writers', 'summary': 'Explains how to use file streams to store and manipulate string data by converting it into byte arrays, writing to a file, reading data from a file, and using stream writers to write strings to a text file, showcasing the functionality of various methods and classes in c#.', 'duration': 436.468, 'highlights': ['Using file streams to store and manipulate string data The chapter demonstrates the process of converting a string into a byte array using encoding defaults, writing the byte array to a file, reading data from the file, and converting the byte array back to a string, showcasing the functionality of file stream methods and classes in C#.', 'Utilizing stream writers to write strings to a text file The chapter showcases the usage of stream writers to create and write strings to a text file, demonstrating the use of methods such as Write, WriteLine, and Close, providing a comprehensive understanding of the functionality of stream writers in C#.']}], 'duration': 436.468, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY595158.jpg', 'highlights': ['The chapter demonstrates the process of converting a string into a byte array using encoding defaults, writing the byte array to a file, reading data from the file, and converting the byte array back to a string, showcasing the functionality of file stream methods and classes in C#.', 'The chapter showcases the usage of stream writers to create and write strings to a text file, demonstrating the use of methods such as Write, WriteLine, and Close, providing a comprehensive understanding of the functionality of stream writers in C#.']}, {'end': 1243.691, 'segs': [{'end': 1053.483, 'src': 'embed', 'start': 1031.646, 'weight': 2, 'content': [{'end': 1040.614, 'text': "Okay? So that's how you use the stream readers and the stream writers, and now I'm going to take a look at the binary writers and the binary readers.", 'start': 1031.646, 'duration': 8.968}, {'end': 1049.64, 'text': "OK so the binary writer and reader are going to be used to read and write data types which is I'm sure you can tell pretty useful.", 'start': 1041.795, 'duration': 7.845}, {'end': 1053.483, 'text': "So we're going to go and create a new file here again path for.", 'start': 1049.74, 'duration': 3.743}], 'summary': 'Discusses using stream readers/writers and introduces binary writers/readers for data types.', 'duration': 21.837, 'max_score': 1031.646, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY1031646.jpg'}, {'end': 1155.584, 'src': 'embed', 'start': 1108.53, 'weight': 3, 'content': [{'end': 1119.617, 'text': "and we're gonna use our dat file and we're gonna say open for writing and we're gonna create just some information we want to store inside of there.", 'start': 1108.53, 'duration': 11.087}, {'end': 1126.084, 'text': "so I'm gonna create some, a string called random text, and it's going to contain random text.", 'start': 1119.617, 'duration': 6.467}, {'end': 1127.745, 'text': 'you guessed that all right.', 'start': 1126.084, 'duration': 1.661}, {'end': 1136.853, 'text': "and then we're going to create another one called my age and make that equal to 42, and then we'll create a double which is going to be height,", 'start': 1127.745, 'duration': 9.108}, {'end': 1142.317, 'text': "and i'm going to have that be 6.25 And got all that set up.", 'start': 1136.853, 'duration': 5.464}, {'end': 1147.48, 'text': 'Now if we want to write that information, we just go BW and write.', 'start': 1142.577, 'duration': 4.903}, {'end': 1152.623, 'text': "And let's get some random text and throw that inside of there.", 'start': 1148.22, 'duration': 4.403}, {'end': 1155.584, 'text': "And let's copy this because we got two more to do.", 'start': 1152.843, 'duration': 2.741}], 'summary': 'Using dat file to store random text, age=42, and height=6.25. writing information using bw.', 'duration': 47.054, 'max_score': 1108.53, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY1108530.jpg'}, {'end': 1216.666, 'src': 'embed', 'start': 1182.378, 'weight': 0, 'content': [{'end': 1185.019, 'text': "And I'm going to reference the dat file again.", 'start': 1182.378, 'duration': 2.641}, {'end': 1189.504, 'text': "I'm going to say this time that I want to open it for reading, however.", 'start': 1185.822, 'duration': 3.682}, {'end': 1194.306, 'text': "And then if we want to output the information that's stored inside of there,", 'start': 1189.524, 'duration': 4.782}, {'end': 1203.069, 'text': 'we can do so by just going to the binary reader and say that we want to read a string from it because we know we stored one of those inside of there.', 'start': 1194.306, 'duration': 8.763}, {'end': 1205.71, 'text': 'And we got two more data types to read out of here.', 'start': 1203.389, 'duration': 2.321}, {'end': 1216.666, 'text': "So let's also come in here and say we want to retrieve the integer and let's say that we also want to come in and retrieve the double and then,", 'start': 1206.15, 'duration': 10.516}], 'summary': 'Using binary reader to read string, integer, and double data types from a dat file.', 'duration': 34.288, 'max_score': 1182.378, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY1182378.jpg'}, {'end': 1243.691, 'src': 'embed', 'start': 1223.613, 'weight': 1, 'content': [{'end': 1231.696, 'text': 'and there you can see we went and grabbed random text, the string 42, which is the int, and the double, which was 6.25.', 'start': 1223.613, 'duration': 8.083}, {'end': 1238.785, 'text': 'Okay guys, so that is a lot of information on how you can read and write files and a whole bunch of other different things.', 'start': 1231.696, 'duration': 7.089}, {'end': 1241.989, 'text': 'And like always, please leave your questions and comments below.', 'start': 1238.865, 'duration': 3.124}, {'end': 1243.691, 'text': 'Otherwise, until next time.', 'start': 1242.489, 'duration': 1.202}], 'summary': 'Demonstrated reading and writing files, and handling different data types.', 'duration': 20.078, 'max_score': 1223.613, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY1223613.jpg'}], 'start': 1031.646, 'title': 'Binary data operations in c#', 'summary': "Covers the usage of binary writers and readers to read and write data types, demonstrating how to create and open a dat file using a binary writer to store information such as random text. it also explores the process of writing and reading binary data using c#, including opening, reading, and retrieving data from a dat file, showcasing examples of the retrieved data as 'random text', '42' (int), and '6.25' (double).", 'chapters': [{'end': 1127.745, 'start': 1031.646, 'title': 'Binary writers and readers', 'summary': 'Covers the usage of binary writers and readers to read and write data types, demonstrating how to create and open a dat file using a binary writer to store information such as random text.', 'duration': 96.099, 'highlights': ['The binary writer and reader are used to read and write data types, providing a useful tool for working with files.', 'Demonstrated the creation of a new dat file and opening it using a binary writer to store information like random text.']}, {'end': 1181.417, 'start': 1127.745, 'title': 'Binary data writing and reading', 'summary': 'Covers the process of writing and reading binary data using c#, demonstrating the creation of variables, setting values, writing information, and using binary reader and writer classes.', 'duration': 53.672, 'highlights': ["The process of creating variables and setting values such as 'my age' equal to 42 and 'height' to 6.25 is demonstrated, showcasing data preparation for writing.", "The demonstration of writing information using 'binary writer' is shown, with the addition of random text and the setup for writing multiple pieces of information.", "The usage of 'binary reader' for opening a file for reading binary data is illustrated, presenting the initialization of a binary reader for this purpose."]}, {'end': 1243.691, 'start': 1182.378, 'title': 'Reading and writing files in c#', 'summary': "Explores reading and writing files in c#, demonstrating how to open, read, and retrieve data from a dat file, including a string, integer, and double, showcasing examples of the retrieved data as 'random text', '42' (int), and '6.25' (double).", 'duration': 61.313, 'highlights': ['The chapter demonstrates opening, reading, and retrieving data from a dat file, including a string, integer, and double.', "The examples showcase the retrieved data as 'random text', '42' (int), and '6.25' (double).", 'The chapter encourages audience engagement by inviting questions and comments.']}], 'duration': 212.045, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HKqMqFJr4SY/pics/HKqMqFJr4SY1031646.jpg', 'highlights': ['The chapter demonstrates opening, reading, and retrieving data from a dat file, including a string, integer, and double.', "The examples showcase the retrieved data as 'random text', '42' (int), and '6.25' (double).", 'The binary writer and reader are used to read and write data types, providing a useful tool for working with files.', "The process of creating variables and setting values such as 'my age' equal to 42 and 'height' to 6.25 is demonstrated, showcasing data preparation for writing.", 'Demonstrated the creation of a new dat file and opening it using a binary writer to store information like random text.']}], 'highlights': ['The tutorial covers file system file directory, info, file info, file stream, stream writer, stream reader, binary writer, and binary reader in C Sharp.', 'All the code and transcript of the video are available in the description underneath the video.', 'The chapter emphasizes the process of running Visual Studio as Administrator, which is necessary for certain operations, such as accessing directories or performing specific tasks.', "The chapter explains how to access the current directory in C# using Directory Info, highlighting the use of 'dot' to represent the current directory.", 'The chapter illustrates the process of accessing another directory in C# using Directory Info, particularly emphasizing the utilization of the at sign to enable the use of backslashes and pointing to the desired directory.', 'Covering various operations on directories in C# The chapter provides a comprehensive overview of operations on directories in C#.', 'Accessing directory paths and getting directory names The chapter covers accessing directory paths and obtaining directory names.', 'Getting parent directories and identifying file attributes The chapter includes information on obtaining parent directories and identifying file attributes.', "The chapter explains creating a directory in C# using the 'Directory.CreateDirectory' method, allowing users to specify the directory name and location, providing flexibility for organizing files and data.", "It also demonstrates the deletion of a directory using the 'DirectoryInfo.Delete' method, highlighting the ease of removing directories in C# programming.", 'Focused on the Derek Vance directory There is a focus on operations related to the Derek Vance directory.', 'Covers various file operations such as reading and writing files, retrieving directory information, and extracting specific file types.', "Demonstrates writing to a file by using 'file.writealllines' and reading from a file using 'file.readalllines'.", 'The example demonstrates creating a string array with customer names and writing it to a file.', 'The chapter demonstrates the process of converting a string into a byte array using encoding defaults, writing the byte array to a file, reading data from the file, and converting the byte array back to a string, showcasing the functionality of file stream methods and classes in C#.', 'The chapter showcases the usage of stream writers to create and write strings to a text file, demonstrating the use of methods such as Write, WriteLine, and Close, providing a comprehensive understanding of the functionality of stream writers in C#.', 'The chapter demonstrates opening, reading, and retrieving data from a dat file, including a string, integer, and double.', "The examples showcase the retrieved data as 'random text', '42' (int), and '6.25' (double).", 'The binary writer and reader are used to read and write data types, providing a useful tool for working with files.', "The process of creating variables and setting values such as 'my age' equal to 42 and 'height' to 6.25 is demonstrated, showcasing data preparation for writing.", 'Demonstrated the creation of a new dat file and opening it using a binary writer to store information like random text.']}