Click here to Skip to main content
15,923,689 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to USE LIB FILE in c# Pin
Anubhava Dimri12-Mar-10 23:07
Anubhava Dimri12-Mar-10 23:07 
AnswerRe: How to USE LIB FILE in c# Pin
#realJSOP13-Mar-10 0:49
professional#realJSOP13-Mar-10 0:49 
Questiondelete a file automatically Pin
lawrenceinba12-Mar-10 21:53
lawrenceinba12-Mar-10 21:53 
AnswerRe: delete a file automatically Pin
Anubhava Dimri12-Mar-10 22:12
Anubhava Dimri12-Mar-10 22:12 
AnswerRe: delete a file automatically Pin
Abhinav S12-Mar-10 22:14
Abhinav S12-Mar-10 22:14 
GeneralRe: delete a file automatically Pin
lawrenceinba12-Mar-10 22:26
lawrenceinba12-Mar-10 22:26 
GeneralRe: delete a file automatically Pin
Abhinav S12-Mar-10 22:46
Abhinav S12-Mar-10 22:46 
AnswerRe: delete a file automatically Pin
OriginalGriff12-Mar-10 22:22
mveOriginalGriff12-Mar-10 22:22 
lawrenceinba wrote:
is there any coding for deleting a particular file in specified period of time automatically in c#


If you mean "is there a method to delete a file at a specific time in c#" then no - you have to write it yourself.
But it isn't complex:
1) Create a Timer, give it a sensible interval of 1 minute, or 1 second - depends on how accurate you have to be with the delete time. Create a handler for the Tick event, and start the timer.
2) In the tick event, check if it is time to delete the file, and if so, does it exist. Use the File.Delete method to get rid of the file.

You may want this as a service rather than a Windows Forms app, but that is up to you.
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace

C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy

AnswerRe: delete a file automatically Pin
#realJSOP13-Mar-10 0:50
professional#realJSOP13-Mar-10 0:50 
QuestionSingleton problems Pin
nordsluttning12-Mar-10 21:44
nordsluttning12-Mar-10 21:44 
AnswerRe: Singleton problems Pin
Abhinav S12-Mar-10 22:07
Abhinav S12-Mar-10 22:07 
GeneralRe: Singleton problems Pin
nordsluttning12-Mar-10 22:22
nordsluttning12-Mar-10 22:22 
AnswerRe: Singleton problems Pin
Luc Pattyn13-Mar-10 2:46
sitebuilderLuc Pattyn13-Mar-10 2:46 
GeneralRe: Singleton problems Pin
nordsluttning13-Mar-10 4:21
nordsluttning13-Mar-10 4:21 
QuestionHorizontal scrolling in list box Pin
Reza Shojaee12-Mar-10 21:29
Reza Shojaee12-Mar-10 21:29 
AnswerMessage Removed Pin
12-Mar-10 21:32
Anubhava Dimri12-Mar-10 21:32 
GeneralRe: Horizontal scrolling in list box Pin
OriginalGriff12-Mar-10 22:09
mveOriginalGriff12-Mar-10 22:09 
AnswerRe: Horizontal scrolling in list box Pin
OriginalGriff12-Mar-10 22:09
mveOriginalGriff12-Mar-10 22:09 
QuestionHow organize privilege levels in my client-server database (C#) [modified] Pin
Xgener12-Mar-10 20:26
Xgener12-Mar-10 20:26 
AnswerRe: How organize privilege levels in my client-server database (C#) Pin
#realJSOP13-Mar-10 0:52
professional#realJSOP13-Mar-10 0:52 
QuestionDataTemplate in ListBox Not working Pin
Anu_Bala12-Mar-10 17:24
Anu_Bala12-Mar-10 17:24 
AnswerRe: DataTemplate in ListBox Not working Pin
Abhinav S12-Mar-10 19:59
Abhinav S12-Mar-10 19:59 
GeneralRe: DataTemplate in ListBox Not working Pin
#realJSOP13-Mar-10 0:54
professional#realJSOP13-Mar-10 0:54 
QuestionRunning Multiple Versions of Crystal Reports in WinApp. Pin
DotNetMan12-Mar-10 17:07
DotNetMan12-Mar-10 17:07 
AnswerRe: Running Multiple Versions of Crystal Reports in WinApp. Pin
DotNetMan13-Mar-10 1:53
DotNetMan13-Mar-10 1:53 

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.