Click here to Skip to main content
16,013,440 members
Home / Discussions / C#
   

C#

 
GeneralRe: File I/O Pin
James T. Johnson7-Jun-02 14:03
James T. Johnson7-Jun-02 14:03 
GeneralRe: File I/O Pin
Nish Nishant7-Jun-02 14:11
sitebuilderNish Nishant7-Jun-02 14:11 
GeneralRe: File I/O Pin
8-Jun-02 9:30
suss8-Jun-02 9:30 
GeneralRe: File I/O Pin
Humpo8-Jun-02 10:12
Humpo8-Jun-02 10:12 
GeneralRe: File I/O Pin
James T. Johnson8-Jun-02 10:43
James T. Johnson8-Jun-02 10:43 
GeneralRe: File I/O Pin
8-Jun-02 15:51
suss8-Jun-02 15:51 
GeneralRe: File I/O Pin
8-Jun-02 16:23
suss8-Jun-02 16:23 
GeneralRe: File I/O Pin
Humpo9-Jun-02 1:26
Humpo9-Jun-02 1:26 
Think this is what you are looking for

FileStream objects support random access to files using the Seek method. The Seek method allows the read/write position to be moved to any position within the file.

here's an example of using seek to move to the last 128 bytes of a file...
System.IO.FileStream istream = theFile.Open(FileMode.Open);
long fileLength = istream.Length;
if(fileLength > MP3_LENGTH)
{
	byte[] ba = new byte[MP3_LENGTH];
	istream.Seek(fileLength-MP3_LENGTH, SeekOrigin.Begin); 
	istream.Read(ba, 0 , MP3_LENGTH);
	GetFields(ba);
}


No doubt, as with all my code, there is a more efficient way Smile | :)
GeneralI'm confused, what exactly is C# Pin
Nnamdi Onyeyiri7-Jun-02 12:58
Nnamdi Onyeyiri7-Jun-02 12:58 
GeneralRe: I'm confused, what exactly is C# Pin
James T. Johnson7-Jun-02 14:08
James T. Johnson7-Jun-02 14:08 
GeneralRe: I'm confused, what exactly is C# Pin
Nish Nishant7-Jun-02 14:13
sitebuilderNish Nishant7-Jun-02 14:13 
GeneralRe: I'm confused, what exactly is C# Pin
Christian Graus7-Jun-02 14:40
protectorChristian Graus7-Jun-02 14:40 
GeneralRe: I'm confused, what exactly is C# Pin
James T. Johnson7-Jun-02 15:02
James T. Johnson7-Jun-02 15:02 
QuestionIs the net send GUI app going to get fixed? Pin
7-Jun-02 9:16
suss7-Jun-02 9:16 
GeneralSorted List/Array in C# Pin
sridhar natarajan7-Jun-02 8:37
sridhar natarajan7-Jun-02 8:37 
GeneralRe: Sorted List/Array in C# Pin
Humpo7-Jun-02 12:46
Humpo7-Jun-02 12:46 
GeneralRe: Sorted List/Array in C# Pin
sridhar natarajan10-Jun-02 5:57
sridhar natarajan10-Jun-02 5:57 
GeneralPowerpoint Pin
Vanclei7-Jun-02 4:20
Vanclei7-Jun-02 4:20 
Generalhandle a message. Pin
ygxdha7-Jun-02 1:29
ygxdha7-Jun-02 1:29 
GeneralRe: handle a message. Pin
Nick Parker7-Jun-02 2:03
protectorNick Parker7-Jun-02 2:03 
QuestionHow to get shortcut URL of Internet Explorer Favourite File ... Pin
Pranoti7-Jun-02 1:15
Pranoti7-Jun-02 1:15 
AnswerRe: How to get shortcut URL of Internet Explorer Favourite File ... Pin
Andres Manggini7-Jun-02 15:48
Andres Manggini7-Jun-02 15:48 
Generalmonitor Pin
ygxdha6-Jun-02 18:35
ygxdha6-Jun-02 18:35 
GeneralRe: monitor Pin
James T. Johnson6-Jun-02 18:49
James T. Johnson6-Jun-02 18:49 
GeneralRe: monitor Pin
ygxdha7-Jun-02 1:24
ygxdha7-Jun-02 1:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.