Click here to Skip to main content
15,914,014 members
Home / Discussions / C#
   

C#

 
AnswerRe: write bytes to a file Pin
originSH9-Jul-07 2:53
originSH9-Jul-07 2:53 
GeneralRe: write bytes to a file Pin
WhiteGirl239-Jul-07 3:04
WhiteGirl239-Jul-07 3:04 
GeneralRe: write bytes to a file Pin
Le centriste9-Jul-07 3:25
Le centriste9-Jul-07 3:25 
GeneralRe: write bytes to a file Pin
WhiteGirl239-Jul-07 3:30
WhiteGirl239-Jul-07 3:30 
GeneralRe: write bytes to a file Pin
Luc Pattyn9-Jul-07 3:29
sitebuilderLuc Pattyn9-Jul-07 3:29 
GeneralRe: write bytes to a file Pin
WhiteGirl239-Jul-07 3:34
WhiteGirl239-Jul-07 3:34 
GeneralRe: write bytes to a file Pin
Luc Pattyn9-Jul-07 3:44
sitebuilderLuc Pattyn9-Jul-07 3:44 
GeneralRe: write bytes to a file Pin
Le centriste9-Jul-07 3:36
Le centriste9-Jul-07 3:36 
There are a couple of things strange in your code.

1- You assign a BinaryReader but you do not use it.
2- You are writing a bunch of bytes to a MemoryStream. Are you just trying to copy the 2 byte arrays to a single file (if not, what your code is doing totally escapes me)? This is not really needed. Try this instead:

FileStream fs = File.Create(@"C:\text.doc");
fs.Write(unicodebytes, 0, unicodebytes.Length);
fs.Write(unicodebytes1, 0, unicodebytes1.Length);
fs.Flush();
fs.Close();


If this is not the case, please explain what you are trying to do.


-----

If atheism is a religion, then not collecting stamps is a hobby. -- Unknown

GeneralRe: write bytes to a file Pin
WhiteGirl239-Jul-07 3:43
WhiteGirl239-Jul-07 3:43 
GeneralRe: write bytes to a file Pin
Le centriste9-Jul-07 3:56
Le centriste9-Jul-07 3:56 
GeneralRe: write bytes to a file Pin
WhiteGirl239-Jul-07 4:05
WhiteGirl239-Jul-07 4:05 
GeneralRe: write bytes to a file Pin
originSH9-Jul-07 4:24
originSH9-Jul-07 4:24 
GeneralRe: write bytes to a file Pin
originSH9-Jul-07 4:04
originSH9-Jul-07 4:04 
GeneralRe: write bytes to a file Pin
WhiteGirl239-Jul-07 20:21
WhiteGirl239-Jul-07 20:21 
QuestionException Pin
sangramkp9-Jul-07 2:34
sangramkp9-Jul-07 2:34 
AnswerRe: Exception Pin
valerian.precop9-Jul-07 2:41
valerian.precop9-Jul-07 2:41 
GeneralRe: Exception Pin
sangramkp9-Jul-07 2:58
sangramkp9-Jul-07 2:58 
GeneralRe: Exception Pin
J4amieC9-Jul-07 3:08
J4amieC9-Jul-07 3:08 
GeneralRe: Exception Pin
sangramkp9-Jul-07 3:13
sangramkp9-Jul-07 3:13 
GeneralRe: Exception Pin
sangramkp9-Jul-07 3:21
sangramkp9-Jul-07 3:21 
AnswerRe: Exception Pin
Luc Pattyn9-Jul-07 2:43
sitebuilderLuc Pattyn9-Jul-07 2:43 
GeneralRe: Exception Pin
sangramkp9-Jul-07 3:10
sangramkp9-Jul-07 3:10 
GeneralRe: Exception Pin
Luc Pattyn9-Jul-07 3:19
sitebuilderLuc Pattyn9-Jul-07 3:19 
GeneralRe: Exception Pin
ruanr9-Jul-07 3:32
ruanr9-Jul-07 3:32 
GeneralRe: Exception Pin
Luc Pattyn9-Jul-07 3:47
sitebuilderLuc Pattyn9-Jul-07 3:47 

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.