System.IO.BinaryWriter.Write的问题
帮我修改一下下面这个程序,我改了好几次还是出现了不少错误: 
 __________________________________________________________________________ 
 D:\临时文件\C#\else> csc   2.cs 
 Microsoft   (R)   Visual   C#   2005   编译器   版本   8.00.50727.42 
 用于   Microsoft   (R)   Windows   (R)   2005   Framework   版本   2.0.50727 
 版权所有   (C)   Microsoft   Corporation   2001-2005。保留所有权利。   
 2.cs(14,4):   error   CS1502:   与“System.IO.BinaryWriter.Write(byte[],   int, 
                         int)”最匹配的重载方法具有一些无效参数 
 2.cs(14,13):   error   CS1503:   参数“1”:   无法从“char”转换为“byte[]” 
 -------------------------------------- 
 小妹第一次在此发贴求助,高后帮我一下,谢谢了!!     
 using   System; 
 using   System.IO;   
 class   Text   
 { 
 public   static   void   Main() 
 { 
 string   c= "abcde ";      
 FileStream   fs1=new   FileStream( "D:\\临时文件\\C#\\else\\abc.txt ",FileMode.Create); 
          BinaryWriter   bw=new   BinaryWriter(fs1); 
          bw.Write( 'c ',0,c.Length);      
 bw.Close();      
 fs1.Close();    
 } 
 }
------解决方案--------------------bw.Write( 'c ',0,c.Length);  
 拜托,这个不是将c这个string写入,而只是写入 'c '这个字符。   
 写入字符串用不着BinaryWriter, 用StreamWriter 简单多了。   
 不过一定要用BinaryWriter也可以,先要把string转换成byte[]。 
  System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); 
  bw.Write( encoding.GetBytes( c ) ,0, c.Length );  //encoding.GetBytes将c转成了byte[].
------解决方案--------------------楼主小妹真是牛,是不是用记事本加CSC直接写程序啊,Orz一下。 
 BinaryWriter只能向流中写入二进制数据,说白了,就是传入参数是byte[]。如果要与入文本,就应该用StreamWriter。如果一定要用BinaryWriter,那可以用BitConverter或Encoding把数值或文本转换为byte[]再写入。