Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET C#4.0
How to create .dat file in C#?
Posted 17-Dec-12 16:07pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  
v4

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

  Print Answers RSS
0 OriginalGriff 420
1 DamithSL 253
2 Sergey Alexandrovich Kryukov 210
3 Peter Leow 205
4 Maciej Los 195


Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 17 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid