Click here to Skip to main content
15,890,845 members
Home / Discussions / C#
   

C#

 
GeneralRe: TextBox DataBindings doesn't work... Pin
shayke2328-Nov-09 7:53
shayke2328-Nov-09 7:53 
Questiontabcontrol_DrawItem Pin
User 663428927-Nov-09 13:15
User 663428927-Nov-09 13:15 
AnswerRe: tabcontrol_DrawItem Pin
Luc Pattyn27-Nov-09 14:07
sitebuilderLuc Pattyn27-Nov-09 14:07 
GeneralRe: tabcontrol_DrawItem Pin
User 663428927-Nov-09 14:29
User 663428927-Nov-09 14:29 
GeneralRe: tabcontrol_DrawItem Pin
Luc Pattyn27-Nov-09 14:35
sitebuilderLuc Pattyn27-Nov-09 14:35 
GeneralRe: tabcontrol_DrawItem Pin
User 663428927-Nov-09 14:42
User 663428927-Nov-09 14:42 
QuestionHow to delete a Directory Pin
Wamuti27-Nov-09 12:11
Wamuti27-Nov-09 12:11 
AnswerRe: How to delete a Directory Pin
Luc Pattyn27-Nov-09 14:12
sitebuilderLuc Pattyn27-Nov-09 14:12 
Hi,

write code to delete any files in the directory tree you want to delete. There are basically two ways:
1. ask a list of all files with a GetFiles(path, "*", SearchOptions.AllDirectories), delete all of them, then delete all (now empty) folders and subfolders using Directory.Delete(path, true);
2. write a depth-first recursive method that locates files, deletes them, then deletes the subfolder; this is slightly harder but doesn't get the big memory penalty on huge folders.

NB: since .NET 4.0 there are new methods that relieve the memory consumptions in (1)

PS: there is bound to be a native method that does it all; calling it would require some P/Invoke.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


GeneralRe: How to delete a Directory Pin
Roger Wright27-Nov-09 20:07
professionalRoger Wright27-Nov-09 20:07 
AnswerRe: How to delete a Directory Pin
RCoate27-Nov-09 16:48
RCoate27-Nov-09 16:48 
GeneralRe: How to delete a Directory Pin
Shameel27-Nov-09 18:56
professionalShameel27-Nov-09 18:56 
AnswerRe: How to delete a Directory Pin
Shameel27-Nov-09 18:59
professionalShameel27-Nov-09 18:59 
QuestionJavaScript <-> C# and WebBrowser: How to serialize JS-Objects to C#-Classes and Backward? Pin
softwarejaeger27-Nov-09 9:49
softwarejaeger27-Nov-09 9:49 
AnswerRe: JavaScript <-> C# and WebBrowser: How to serialize JS-Objects to C#-Classes and Backward? Pin
Gerry Schmitz28-Nov-09 4:24
mveGerry Schmitz28-Nov-09 4:24 
GeneralRe: JavaScript <-> C# and WebBrowser: How to serialize JS-Objects to C#-Classes and Backward? Pin
softwarejaeger29-Nov-09 1:48
softwarejaeger29-Nov-09 1:48 
GeneralRe: JavaScript <-> C# and WebBrowser: How to serialize JS-Objects to C#-Classes and Backward? Pin
Gerry Schmitz29-Nov-09 4:44
mveGerry Schmitz29-Nov-09 4:44 
Question[Resolved]Calling to a thread [modified] Pin
Trollslayer27-Nov-09 9:35
mentorTrollslayer27-Nov-09 9:35 
AnswerRe: Calling to a thread Pin
Garth J Lancaster27-Nov-09 10:33
professionalGarth J Lancaster27-Nov-09 10:33 
AnswerRe: Calling to a thread Pin
Luc Pattyn27-Nov-09 10:35
sitebuilderLuc Pattyn27-Nov-09 10:35 
General[More info] Re: Calling to a thread Pin
Trollslayer27-Nov-09 11:12
mentorTrollslayer27-Nov-09 11:12 
GeneralRe: [More info] Re: Calling to a thread Pin
Luc Pattyn27-Nov-09 12:41
sitebuilderLuc Pattyn27-Nov-09 12:41 
GeneralRe: [More info] Re: Calling to a thread Pin
Trollslayer27-Nov-09 13:00
mentorTrollslayer27-Nov-09 13:00 
GeneralRe: [More info] Re: Calling to a thread Pin
Daniel Grunwald27-Nov-09 14:57
Daniel Grunwald27-Nov-09 14:57 
GeneralRe: [More info] Re: Calling to a thread Pin
Trollslayer27-Nov-09 23:25
mentorTrollslayer27-Nov-09 23:25 
QuestionDistance calculator Pin
Chazzysb27-Nov-09 8:57
Chazzysb27-Nov-09 8:57 

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.