Click here to Skip to main content
15,916,030 members
Home / Discussions / C#
   

C#

 
Questionsave key board strokes in a file Pin
abbmalleshmca23-May-08 6:10
abbmalleshmca23-May-08 6:10 
AnswerRe: save key board strokes in a file Pin
Anthony Mushrow23-May-08 6:12
professionalAnthony Mushrow23-May-08 6:12 
GeneralRe: save key board strokes in a file Pin
abbmalleshmca29-May-08 4:21
abbmalleshmca29-May-08 4:21 
AnswerRe: save key board strokes in a file Pin
Christian Graus23-May-08 12:13
protectorChristian Graus23-May-08 12:13 
AnswerRe: save key board strokes in a file Pin
DaveyM6923-May-08 12:16
professionalDaveyM6923-May-08 12:16 
GeneralRe: save key board strokes in a file Pin
Christian Graus23-May-08 12:29
protectorChristian Graus23-May-08 12:29 
QuestionRead Files using BinaryReader Pin
Ian Uy23-May-08 5:46
Ian Uy23-May-08 5:46 
AnswerRe: Read Files using BinaryReader Pin
Anthony Mushrow23-May-08 6:10
professionalAnthony Mushrow23-May-08 6:10 
Its simple, you have a buffer of size N and you try to read N bytes from your file into this little buffer. The Stream.Read(...) method returns and int representing the number of bytes actualy read, so you then use this int to write the correct number of bytes from your buffer to your BinaryStream or whatever your using. You then keep copying bytes until you reach the end. It should look something like this:

FileStream fs = new FileStream(...);
BinaryStream bs = new BinaryStream();
byte[] buffer = new byte[1024];
int read = 0;
while(bs.Position < fs.Length)
{
  read = fs.Read(buffer, 0, 1024);
  bs.Write(buffer, 0, read);
}
fs.Close();


My current favourite word is: I'm starting to run out of fav. words!
-SK Genius

Game Programming articles start -here[^]-

QuestionEnable Database connection change Pin
redivider23-May-08 5:21
redivider23-May-08 5:21 
QuestionHow do I Create a C# Webserver? Pin
neelchauhan23-May-08 3:42
neelchauhan23-May-08 3:42 
AnswerRe: How do I Create a C# Webserver? Pin
DaveyM6923-May-08 3:46
professionalDaveyM6923-May-08 3:46 
AnswerRe: How do I Create a C# Webserver? Pin
carbon_golem23-May-08 4:25
carbon_golem23-May-08 4:25 
AnswerRe: How do I Create a C# Webserver? Pin
led mike23-May-08 4:49
led mike23-May-08 4:49 
AnswerRe: How do I Create a C# Webserver? Pin
Vasudevan Deepak Kumar23-May-08 4:53
Vasudevan Deepak Kumar23-May-08 4:53 
JokeRe: How do I Create a C# Webserver? Pin
Ashfield23-May-08 5:51
Ashfield23-May-08 5:51 
AnswerRe: How do I Create a C# Webserver? Pin
Ravi Bhavnani23-May-08 7:06
professionalRavi Bhavnani23-May-08 7:06 
GeneralThanks Pin
neelchauhan24-May-08 3:03
neelchauhan24-May-08 3:03 
QuestionWhich is an error while I add XpExploreBar in csharp? Pin
ngoloi23-May-08 2:25
ngoloi23-May-08 2:25 
AnswerRe: Which is an error while I add XpExploreBar in csharp? Pin
Not Active23-May-08 2:44
mentorNot Active23-May-08 2:44 
AnswerRe: Which is an error while I add XpExploreBar in csharp? Pin
Abhijit Jana23-May-08 3:05
professionalAbhijit Jana23-May-08 3:05 
AnswerRe: Which is an error while I add XpExploreBar in csharp? Pin
Ravi Bhavnani23-May-08 5:45
professionalRavi Bhavnani23-May-08 5:45 
QuestionUsing LINQ with a ASP application Pin
Steve Holdorf23-May-08 2:19
Steve Holdorf23-May-08 2:19 
AnswerRe: Using LINQ with a ASP application Pin
Not Active23-May-08 2:42
mentorNot Active23-May-08 2:42 
GeneralRe: Using LINQ with a ASP application Pin
Steve Holdorf23-May-08 3:08
Steve Holdorf23-May-08 3:08 
GeneralRe: Using LINQ with a ASP application Pin
Not Active23-May-08 3:16
mentorNot Active23-May-08 3:16 

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.