Click here to Skip to main content
15,917,709 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: System.NullReferenceException: Check my solution someone, pls Pin
KCDude20-Jan-11 6:46
KCDude20-Jan-11 6:46 
GeneralRe: System.NullReferenceException: Check my solution someone, pls Pin
Ian Shlasko20-Jan-11 7:45
Ian Shlasko20-Jan-11 7:45 
AnswerRe: System.NullReferenceException: Check my solution someone, pls Pin
Luc Pattyn20-Jan-11 6:28
sitebuilderLuc Pattyn20-Jan-11 6:28 
AnswerRe: System.NullReferenceException: Check my solution someone, pls Pin
Eddy Vluggen21-Jan-11 1:04
professionalEddy Vluggen21-Jan-11 1:04 
QuestionGeneral Question about programming steps Pin
joyfullboy2997319-Jan-11 2:17
joyfullboy2997319-Jan-11 2:17 
AnswerRe: General Question about programming steps Pin
Pravin Patil, Mumbai19-Jan-11 4:12
Pravin Patil, Mumbai19-Jan-11 4:12 
AnswerRe: General Question about programming steps Pin
Manfred Rudolf Bihy19-Jan-11 11:03
professionalManfred Rudolf Bihy19-Jan-11 11:03 
AnswerRe: General Question about programming steps Pin
T210219-Jan-11 14:36
T210219-Jan-11 14:36 
JokeRe: General Question about programming steps Pin
joyfullboy2997320-Jan-11 0:53
joyfullboy2997320-Jan-11 0:53 
QuestionOrphan Question [modified] - Has a Home now! Pin
Soulus8318-Jan-11 19:52
Soulus8318-Jan-11 19:52 
AnswerRe: Orphan Question Pin
Andy_L_J18-Jan-11 20:01
Andy_L_J18-Jan-11 20:01 
QuestionPre-requisites for email program Pin
Uma Kameswari18-Jan-11 19:42
Uma Kameswari18-Jan-11 19:42 
AnswerRe: Pre-requisites for email program Pin
Dave Kreskowiak19-Jan-11 2:20
mveDave Kreskowiak19-Jan-11 2:20 
GeneralRe: Pre-requisites for email program Pin
Uma Kameswari24-Jan-11 18:28
Uma Kameswari24-Jan-11 18:28 
AnswerRe: Pre-requisites for email program Pin
_Erik_19-Jan-11 5:29
_Erik_19-Jan-11 5:29 
QuestionCHM html help called from VB6 application works but can't be searched [modified] Pin
reto.knaak14-Jan-11 4:02
reto.knaak14-Jan-11 4:02 
QuestionCommunication between VBscript and command prompt window Pin
Tim_abcd14-Jan-11 1:35
Tim_abcd14-Jan-11 1:35 
AnswerRe: Communication between VBscript and command prompt window Pin
Dave Kreskowiak14-Jan-11 3:57
mveDave Kreskowiak14-Jan-11 3:57 
GeneralRe: Communication between VBscript and command prompt window Pin
Tim_abcd15-Jan-11 20:38
Tim_abcd15-Jan-11 20:38 
QuestionNumber of files in a folder Pin
Central_IT13-Jan-11 1:48
Central_IT13-Jan-11 1:48 
AnswerRe: Number of files in a folder PinPopular
Luc Pattyn13-Jan-11 1:58
sitebuilderLuc Pattyn13-Jan-11 1:58 
Central_IT wrote:
What is the best way to ...


Depends on your definition of best.

The easiest way would be based on the Directory.GetFiles(String, String) method, taking the Count of the array being returned. This however is not the least expensive one in terms of system load, as it is building an array of strings, which potentially could be huge and take long.

The cheapest way would probably be based on calling the Win32 functions GetFirstFile() and GetNextFile(), which requires P/Invoke and a bit more code.

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

modified on Friday, January 14, 2011 6:27 AM

QuestionHow to detect the launched appliction? Pin
azusakt12-Jan-11 15:40
azusakt12-Jan-11 15:40 
AnswerRe: How to detect the launched appliction? Pin
Luc Pattyn12-Jan-11 16:21
sitebuilderLuc Pattyn12-Jan-11 16:21 
GeneralRe: How to detect the launched appliction? Pin
azusakt18-Jan-11 17:34
azusakt18-Jan-11 17:34 
AnswerRe: How to detect the launched appliction? Pin
JR21212-Jan-11 22:38
JR21212-Jan-11 22:38 

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.