Click here to Skip to main content
15,906,816 members
Home / Discussions / C#
   

C#

 
GeneralRe: serialization / type cast differs between service and console execution Pin
Dave Kreskowiak27-Mar-13 1:48
mveDave Kreskowiak27-Mar-13 1:48 
GeneralRe: serialization / type cast differs between service and console execution Pin
JudyL_MD27-Mar-13 1:52
JudyL_MD27-Mar-13 1:52 
Questiondevexpress winforms controls Pin
naseer86126-Mar-13 11:16
naseer86126-Mar-13 11:16 
AnswerRe: devexpress winforms controls Pin
Dave Kreskowiak26-Mar-13 11:43
mveDave Kreskowiak26-Mar-13 11:43 
AnswerRe: devexpress winforms controls Pin
Pete O'Hanlon26-Mar-13 12:09
mvePete O'Hanlon26-Mar-13 12:09 
AnswerRe: devexpress winforms controls Pin
NotPolitcallyCorrect26-Mar-13 14:45
NotPolitcallyCorrect26-Mar-13 14:45 
AnswerRe: devexpress winforms controls Pin
Mycroft Holmes26-Mar-13 15:29
professionalMycroft Holmes26-Mar-13 15:29 
QuestionDirectoryInfo does not return full path Pin
MumbleB26-Mar-13 9:43
MumbleB26-Mar-13 9:43 
Hi All. I have a slight problem in that my DirectoryInfo does not return the full path. Does anybody know if there is a limitation to the DirectoryInfo?

The path to the files is something like this:

C:\\Folder1\\Folder2\\Folder3\\Folder4\\Folder5

My code is as follows:

C#
private void getAllFiles(string sExt, string sFolder)
{
    DirectoryInfo di = new DirectoryInfo(sFolder);
    FileInfo[] fi = di.GetFiles(sExt, SearchOption.AllDirectories);
    //List<FileInfo> fi = new List<FileInfo>(di.EnumerateFiles(sExt, SearchOption.AllDirectories));
    foreach (FileInfo file in fi)
    {
        AddNewFile(Path.Combine(di.ToString(), file.ToString()));
        counter++;
    }
    lblTotalFiles.Text = counter.ToString();
    //SetText(counter.ToString());
}



FileInfo seems to get the location of the file as it shows me the file it picked up but when the path of DirectoryIfo is passed on it excludes Folder5 thus the object I am passing it to doesn't find the file in question. Is there anyway I can fix this?
Excellence is doing ordinary things extraordinarily well.

AnswerRe: DirectoryInfo does not return full path Pin
Alan N26-Mar-13 11:18
Alan N26-Mar-13 11:18 
GeneralRe: DirectoryInfo does not return full path Pin
MumbleB2-Apr-13 9:12
MumbleB2-Apr-13 9:12 
QuestionUSB To Increase speed Pin
C-P-User-326-Mar-13 6:37
C-P-User-326-Mar-13 6:37 
QuestionRe: USB To Increase speed Pin
MicroVirus27-Mar-13 3:19
MicroVirus27-Mar-13 3:19 
QuestionType cast a enum to different enum type in the entire List; C# Pin
ptr_Electron26-Mar-13 3:47
ptr_Electron26-Mar-13 3:47 
GeneralRe: Type cast a enum to different enum type in the entire List; C# Pin
harold aptroot26-Mar-13 3:57
harold aptroot26-Mar-13 3:57 
GeneralRe: Type cast a enum to different enum type in the entire List; C# Pin
ptr_Electron26-Mar-13 5:39
ptr_Electron26-Mar-13 5:39 
AnswerRe: Type cast a enum to different enum type in the entire List; C# Pin
PIEBALDconsult26-Mar-13 5:11
mvePIEBALDconsult26-Mar-13 5:11 
GeneralRe: Type cast a enum to different enum type in the entire List; C# Pin
ptr_Electron26-Mar-13 5:40
ptr_Electron26-Mar-13 5:40 
AnswerRe: Type cast a enum to different enum type in the entire List; C# Pin
OriginalGriff26-Mar-13 6:38
mveOriginalGriff26-Mar-13 6:38 
AnswerRe: Type cast a enum to different enum type in the entire List; C# Pin
Bernhard Hiller26-Mar-13 22:29
Bernhard Hiller26-Mar-13 22:29 
QuestionHow to append connectionString from one config file to other config file Pin
NarVish26-Mar-13 1:32
NarVish26-Mar-13 1:32 
QuestionOverflow, carry, etc i C# Pin
hanzibal226-Mar-13 0:00
hanzibal226-Mar-13 0:00 
AnswerRe: Overflow, carry, etc i C# Pin
Richard MacCutchan26-Mar-13 0:08
mveRichard MacCutchan26-Mar-13 0:08 
GeneralRe: Overflow, carry, etc i C# Pin
Jonathan Nethercott26-Mar-13 0:40
professionalJonathan Nethercott26-Mar-13 0:40 
GeneralRe: Overflow, carry, etc i C# Pin
Richard MacCutchan26-Mar-13 1:03
mveRichard MacCutchan26-Mar-13 1:03 
GeneralRe: Overflow, carry, etc i C# Pin
hanzibal226-Mar-13 2:01
hanzibal226-Mar-13 2:01 

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.