Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
Hi,
 
I want to read the data from a .DAT File.
below is the structure of how the data is arranged inside the DAT File.
 
Winword.exe-|-Excel.exe-|-MS PAINT.exe-|-
 
-|- is used to make separation between the two data entry!!
 
Can anybody help me on how to read the from this .DAT file using C# programing!!!
 
Thanks in Advance
 
Best Regards
Balkrishna Raut
Posted 28-Sep-10 21:41pm
Comments
shubhangi waghmare at 17-Aug-13 4:46am
   
I want to read audio file or recording file in character format in c#.net
Please help me anyone...
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This is the example of reading serialized custom object reding from .DAT file
 
ObjectToSerialize objectToSerialize;
      Stream stream = File.Open(filename, FileMode.Open);
      BinaryFormatter bFormatter = new BinaryFormatter();
      objectToSerialize = (ObjectToSerialize)bFormatter.Deserialize(stream);
      stream.Close();
      return objectToSerialize;
 
You could use 'String' Instead of 'ObjectToSerialize' ( because your .DAT contains string rather then custom object)
 
Please vote and Accept Answer if it Helped.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Thumbs Down | :thumbsdown: Rose | [Rose] Cool | :cool: Suspicious | :suss: Unsure | :~ Mad | :mad: Mad | :mad: Mad | :mad: fghfghfg
 
f
gh
g
fh
fg :doh: ;P :laugh: :( :cool::thumbsup:
  Permalink  
Comments
tulasiram3975 at 18-Sep-12 10:10am
   
please dont keep this type of solutions...

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

  Print Answers RSS
0 CPallini 365
1 Sergey Alexandrovich Kryukov 317
2 OriginalGriff 165
3 George Jonsson 159
4 Abdul Samad KP 125
0 OriginalGriff 6,344
1 Sergey Alexandrovich Kryukov 5,860
2 CPallini 5,125
3 George Jonsson 3,559
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 7 Oct 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100