Is it possible to store some special content inside file header of “.txt” file using .Net ? If yes how ? Please give me a sample code.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, this is not possible. .txt files don’t have a header. They are plain (text) files without any additional file structure.
If you need to attach additional information to a .txt file you might want to have a look at Alternate Data Streams which are available when you are using NTFS. However, alternate data streams are a feature of NTFS only and will not survive a file transfer via another medium beyond a simple file copy (web streaming, sending by email, etc).
As your question is tagged with
encryptionit looks as if you are trying to store additional encryption information or a digital signature with your .txt file. In such a case it might as well be an option for you to have a look at container formats such as zip.