I don't really have a question I just want to say this was a great video
@mortrem769 ай бұрын
It is a great video
@MUSHIN_8883 ай бұрын
Thanks dude, this is exactly what I needed to learn for a lab question in my programming class at uni
@markyrocks693 жыл бұрын
Very useful video. I'm primarily a c++ user but you can't beat the ui building tools in c#.
@gecko20232 жыл бұрын
honestly, i've been doing coding for about 6 years now, and text files were a sort of, no go topic for me, this honestly made it seem so simple I feel a little stupid xD But in all seriousness, thanks mate, this has helped a lot
@shwetachavan7519 ай бұрын
Thank you for so easy to understand videos. I had difficulty understanding this topic but after watching this video , I understood the topic very well. Thank you.
@emiledanielbouwer69632 жыл бұрын
Thank you. This was simple, helpful and using the list approach makes the class more versatile.
@Furki4_42 жыл бұрын
Thank you Prof Sluiter for precise explanation
@InventorDBA3 жыл бұрын
tip for anyone who is watching this: if you are using windows, in file explorer make your text file, click on the "home tab" on top, and click copy path. You don't have to manually copy the path every time.
@mateeeje2 жыл бұрын
How to search for it. I have etc. John and he has number one after him and when i enter 1 to display john
@codymckinney4934 Жыл бұрын
i do this, but wondering whats the pros and cons to stream reader vs this
@smoua45883 жыл бұрын
Thank you so much Professor Sluiter
@FileFN3 Жыл бұрын
I have a problem with the code : My file name and path are correct but it says it can not find it
@alshentec22862 жыл бұрын
Do you have any tricky ways to save txt file as different names such as 123 while theere is already a txt file as that one thanks for your video
@kooyoung48663 жыл бұрын
how do i delete words on the text instead of writing to it ?
@jonlbs74 жыл бұрын
EXCELLENT !!! One of the best on just what I was looking for. 😊👍👌👍
@thelinguafranca54213 жыл бұрын
Hello, how can I return a specific line in all lines. Tnx
@tprnbs2 жыл бұрын
Great tutorial! is it the same as using StreamReader/StreamWriter? Thanks!
@kellothermes50902 жыл бұрын
It's only showing FileNotFoundException . How should I resolve this exception ?
@shadsluiter2 жыл бұрын
It could be that the file is named differently than what it appears. Check to see that file extensions are visible on your computer. The file may be called filename.txt.txt instead of filename.txt
@kellothermes50902 жыл бұрын
@@shadsluiter Thank you , that was exactly what was happening.
@aravindswamy47423 жыл бұрын
Nice video. How will you bind the data for an employee registration form on the each text box that is named accordingly? When I tried doing the data binding, all the datas are binded on a single text box?
@yoshikiyamaguchi52955 жыл бұрын
I have a question. After I read the textfile, if I wanted to write the same thing in a different format, how could I do that? For example, now my textfile says 116 11/2/2012 18:22 N9 45.483 E10 30.495 416 m Now I want to write them to another file in the following manner 116, 11/2/2012 18:22, N9 45.483 E10 30.495, 416m How could I make it so that all the information are lined up in one line, and separate them with " , " ?
@shadsluiter5 жыл бұрын
You can join strings in C# very easily. Here is a good page to explain it docs.microsoft.com/en-us/dotnet/csharp/how-to/concatenate-multiple-strings
@frab80615 жыл бұрын
I have a question, at the ending you're adding jon doe to the list and then writing the list to the file. But the other names were already in there. I thought there have to be the names from before plus the names from before again plus jon doe. Why is this not the case? Does the content of the file getting overwritten with File.WriteAllLines?
@shadsluiter5 жыл бұрын
Each time we run the program we do this (1) read all lines (2) add John Doe to the list of names (3) write the list back to the file. The file is overwritten each time. There is an option to the writeAllLines() method to either append or overwrite the file. Overwrite is the default choice if no parameter is provided. Check out the docs on the method here docs.microsoft.com/en-us/dotnet/api/system.io.file.writealllines?view=netframework-4.8
@calvinking33552 жыл бұрын
Having an issue where filepath is denied access. I've tried it on multiple text files and still receive the same problem. The program reads the file just fine. It just doesn't write to it. Saw other people were experiencing the same thing was hoping for a quick fix. Using VS 2019 CE.
@calvinking33552 жыл бұрын
I fixed it. While the problem is common, the solution is not so much. Those who come across this problem, leave a reply and I'll share my fix.
@deathvaisen63812 жыл бұрын
@@calvinking3355 How to fix it man
@calvinking33552 жыл бұрын
@@deathvaisen6381 I just created a new folder through VS2020E. That will allow you to read and write only to the folder that was created through the program. Basically, my CPU didn't acknowledge permissions so reading/editing/appending were confined to the program's own environment. Hope that helps!
@vusivuyanithemba7973 жыл бұрын
You are the best, I am going to be a good C# programmer soon
@shadsluiter3 жыл бұрын
Good to hear. How is your plan working out so far?
@pje_3 жыл бұрын
How to read and write to EXE FILE?
@parsaabdolhossaini39783 жыл бұрын
great video, I learned something new today
@shadsluiter3 жыл бұрын
Glad you liked it!
@magmyr4 жыл бұрын
Hello Shad, thanks for a well explained video! I have one question thought, when i try to run my program to read the text file it throws me an error of access denied. Any idea how can i fix that? Thanks in advance!
@cossinle4 жыл бұрын
Try running your application as adminstrator.
@magmyr4 жыл бұрын
@@cossinle still get the same error. Any possible solutions i could try?
@magmyr4 жыл бұрын
I fixed the problem. Thanks for the help!
@MaybeKian4 жыл бұрын
@@magmyr why cant you say how you fixed it? there are ppl who have the same problem.
@hrishikeshgarud71774 жыл бұрын
@@magmyr how
@douglasposho92993 жыл бұрын
Keep up the good work
@randomtopicvideos39574 жыл бұрын
Can you help me, i have this error, System.UnauthorizedAccessException,how should i fix this
@equation13214 жыл бұрын
staccoverflo
@thedude40394 жыл бұрын
Perhaps the location of the file is not accessible by the user you are using on your computer. Try making whichever outlook account you are signed onto your computer as, admin. If this doesn't work, idk. If you're on mac, idk.
@OpTicMatrixJ4 жыл бұрын
Great video sir thank you!!!
@kacper22464 жыл бұрын
what does the @ before the string mean?
@pedro2mnunes4 жыл бұрын
The @ character specifies a string as a verbatim literal string. In this way you can use characters like \ without escape characters.
@kacper22464 жыл бұрын
@@pedro2mnunes that is actually very useful, thanks :)
@Noah.Nation2 жыл бұрын
Doesn't work :/
@umairjamshaid21734 жыл бұрын
Super helpful. Thanks alot
@TonyDaExpert4 жыл бұрын
I hope this is helpful making something in c# where I want to store an id and a date on a file line. With c++ (my native programming language) I could just get a for loop to go over each line and directly copy the set amount of values within each line into different variables (separate for ID and date) within an array
@bharanivasanthbca47563 жыл бұрын
Tanx for the information
@minetomek4 жыл бұрын
Thanks for info. :)
@haydenstuteville94235 жыл бұрын
It didn't show me my combos (my list) it just showed alot of system.string stuff can you help?
@shadsluiter5 жыл бұрын
Perhaps you need a toString() method defined in the class/object you are trying to display. Here is a good link to explain it kzbin.info/www/bejne/iorWmoOVoZqMqck
@nynthes84882 жыл бұрын
thanks bush
@adamloepker80573 жыл бұрын
saved me from a less than effective class cession
@jonlbs74 жыл бұрын
Where's the next one? You mentioned "in a future video .." and then I can't find it..
@davidheizer62323 жыл бұрын
kzbin.info/www/bejne/e4qaepd4edFnhqs
@Wonglamai4 жыл бұрын
thank you
@palkay8753 жыл бұрын
Good video thx
@debprosad68903 жыл бұрын
nice
@exile39654 жыл бұрын
Good video thanks
@shadsluiter4 жыл бұрын
So nice of you
@exile39654 жыл бұрын
shad sluiter your welcome dude
@BKadezabek4 жыл бұрын
Thanks :D
@mqrvmckl35044 жыл бұрын
Very helpfull
@brockbillings42994 жыл бұрын
Great video, but on a completely unrelated note this guy looks so much like kronos from god of war