Click here to Skip to main content
16,015,444 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to create .dat file in C#?
Posted

There is no such thing as ".dat file", more exactly, it can be anything. Accordingly, it can be created in a number of way. The question per se makes little to no sense.
You should understand that file names do not matter much, even though some conventions on the name pattern exist and "file types" are registered in the system registry and associated with certain application to handle them. There is no other meaning associated to file name patterns.

To work with files in .NET, use System.IO: http://msdn.microsoft.com/en-us/library/system.io.aspx[^].

—SA
 
Share this answer
 
v4
you can create any file you like, using the file stream classes. If your file has a specific format, you need to look for a library that creates it for you, or learn how to create files in that format.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900