Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Csharp.net
I have a folder contains some file are available. In that file some are opened for these files how can i close these open files.Please let me know.
Posted 20-Feb-13 2:32am
Comments
Richard MacCutchan at 20-Feb-13 8:58am
   
What do you mean by "open"? If you have opened them in your code then you can also close them.
Sandeep Mewara at 20-Feb-13 9:16am
   
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.
ryanb31 at 20-Feb-13 10:35am
   
Are they open by a user or by you? What are you trying to do?
José Amílcar Ferreira Casimiro at 20-Feb-13 17:33pm
   
very ambiguous question, please rephrase. thank you

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

If the file was opened by you, and assuming you use a variable named "myFile", then you should use the following code:
 
myFile.Close();
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 195
1 Afzaal Ahmad Zeeshan 152
2 ProgramFOX 130
3 Maciej Los 130
4 den2k88 80
0 OriginalGriff 6,564
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,228
3 Manas Bhardwaj 4,657
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100