I'm creating a program that can convert different files types to pdf.
After creating a .txt
to .pdf
converter, which uses System.IO.File.ReadAllLines()
I realized that I could use that same converter for .csv
, which left me wondering what other file types I could theoretically support because of the ReadAllLines
approach.
Since ReadAllLines()
reads the lines as text, you can use it for any text-based file type. There is no comprehensive list of "types" of files in this category (new file types are invented all the time), but most of them are probably going to be files intended for use as code (.cs
, .java
, etc.), or as structured data which is often used to transfer data between applications (.xml
, .json
, etc.).
You could theoretically call the method for other (binary) files, but you'd end up with a bunch of useless gobbledegook.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With