| 
    
     | 
    
    Forums -> Miscellaneous Forum  
    
      
        
        
          
            | IniRead bug (related to OpenFileDialog) ? | 
            
                             Reply
                            | 
           
         
         | 
       
      
        
          
            
              by Tiberiu Valean [tiberiu_valean at yahoo dot com] posted on 2004/03/26 | 
              
                 | 
             
           
        
        
        
        Hello all, 
 
Lately I've been downloaded the IniReader class. I use it inisde an application where I use also the OpenFileDialog class. I've noticed a strange behaviour (probably a bug) : 
The IniReader class works perfect (read/ write to ini file) I click OK on the OpenFileDialog (after I choose a file) the IniReader cannot anymore write to the ini file and the method Write will always returned false. If I click Cancel on the OpenFileDialog this things are not happening. 
Dows anybody meet this problem before or has any idea regarding this issue ? 
Thank you, 
Tibi 
  | 
       
      
        
          
            
              by Pieter Philippaerts [Pieter at mentalis dot org] posted on 2004/04/01 | 
              
                Reply | 
             
           
        
        
        
        That's probably because there's still an open file handle which is causing the write to fail. If you're opening the INI file with a System.IO.Fiel object, make sure you close it before writing to it with the IniReader class. 
If this doesn't help, could you post some code that illustrates the problem?  | 
       
     
 | 
 |