Click here to Skip to main content
15,900,372 members
Home / Discussions / C#
   

C#

 
QuestionFile.Delete() fails (Access rights required???) Pin
Shy Agam15-May-06 5:16
Shy Agam15-May-06 5:16 
AnswerRe: File.Delete() fails (Access rights required???) Pin
leppie15-May-06 5:27
leppie15-May-06 5:27 
GeneralRe: File.Delete() fails (Access rights required???) Pin
Shy Agam15-May-06 6:15
Shy Agam15-May-06 6:15 
AnswerRe: File.Delete() fails (Access rights required???) Pin
Judah Gabriel Himango15-May-06 6:25
sponsorJudah Gabriel Himango15-May-06 6:25 
GeneralRe: File.Delete() fails (Access rights required???) Pin
Shy Agam15-May-06 7:25
Shy Agam15-May-06 7:25 
AnswerRe: File.Delete() fails (Access rights required???) Pin
Guffa15-May-06 7:57
Guffa15-May-06 7:57 
GeneralRe: File.Delete() fails (Access rights required???) Pin
Shy Agam15-May-06 8:38
Shy Agam15-May-06 8:38 
GeneralRe: File.Delete() fails (Access rights required???) Pin
Dan Neely15-May-06 8:52
Dan Neely15-May-06 8:52 
shyagam wrote:

s.Close();
s = null;
GC.Collect();


This should give you the same results as the above without abusing the GC. Any object implementing IDisposable should be disposed as soon as you're done with it to free resources.

s.Close();
s.Dispose();

GeneralRe: File.Delete() fails (Access rights required???) Pin
Shy Agam16-May-06 7:41
Shy Agam16-May-06 7:41 
GeneralRe: File.Delete() fails (Access rights required???) Pin
Judah Gabriel Himango15-May-06 8:13
sponsorJudah Gabriel Himango15-May-06 8:13 
GeneralRe: File.Delete() fails (Access rights required???) Pin
Shy Agam15-May-06 8:31
Shy Agam15-May-06 8:31 
GeneralRe: File.Delete() fails (Access rights required???) Pin
Judah Gabriel Himango15-May-06 10:10
sponsorJudah Gabriel Himango15-May-06 10:10 
AnswerRe: File.Delete() fails (Access rights required???) Pin
Shy Agam15-May-06 8:48
Shy Agam15-May-06 8:48 
QuestionContextMenu + NotifyIcon + LEFT Click Problem Pin
Phoen2515-May-06 4:59
Phoen2515-May-06 4:59 
AnswerRe: ContextMenu + NotifyIcon + LEFT Click Problem Pin
NaNg1524115-May-06 6:46
NaNg1524115-May-06 6:46 
GeneralRe: ContextMenu + NotifyIcon + LEFT Click Problem Pin
Phoen2515-May-06 7:48
Phoen2515-May-06 7:48 
GeneralRe: ContextMenu + NotifyIcon + LEFT Click Problem Pin
Nader Elshehabi15-May-06 12:56
Nader Elshehabi15-May-06 12:56 
GeneralRe: ContextMenu + NotifyIcon + LEFT Click Problem Pin
Phoen2516-May-06 4:03
Phoen2516-May-06 4:03 
GeneralRe: ContextMenu + NotifyIcon + LEFT Click Problem Pin
Nader Elshehabi16-May-06 11:15
Nader Elshehabi16-May-06 11:15 
GeneralRe: ContextMenu + NotifyIcon + LEFT Click Problem Pin
Phoen2517-May-06 5:05
Phoen2517-May-06 5:05 
GeneralRe: ContextMenu + NotifyIcon + LEFT Click Problem Pin
Nader Elshehabi17-May-06 6:23
Nader Elshehabi17-May-06 6:23 
GeneralRe: ContextMenu + NotifyIcon + LEFT Click Problem Pin
Phoen2518-May-06 2:30
Phoen2518-May-06 2:30 
QuestionCaching Data Across Seperate Instances Pin
MrEyes15-May-06 4:21
MrEyes15-May-06 4:21 
AnswerRe: Caching Data Across Seperate Instances Pin
leppie15-May-06 5:30
leppie15-May-06 5:30 
QuestionDataGrid Column Header Pin
Small Rat15-May-06 4:13
Small Rat15-May-06 4:13 

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.