Click here to Skip to main content
15,920,438 members
Home / Discussions / C#
   

C#

 
GeneralExecuting Batch Files from .NET Pin
Aisha21-Jun-02 7:10
Aisha21-Jun-02 7:10 
GeneralWriting a MIME Email Attachment to a Binary File Pin
Paul Watson21-Jun-02 7:03
sitebuilderPaul Watson21-Jun-02 7:03 
GeneralRe: Writing a MIME Email Attachment to a Binary File Pin
Christopher Lord21-Jun-02 13:42
Christopher Lord21-Jun-02 13:42 
GeneralRe: Writing a MIME Email Attachment to a Binary File Pin
Paul Watson22-Jun-02 2:35
sitebuilderPaul Watson22-Jun-02 2:35 
GeneralRe: Writing a MIME Email Attachment to a Binary File Pin
Nish Nishant21-Jun-02 18:20
sitebuilderNish Nishant21-Jun-02 18:20 
QuestionASPNET local user = acceptable performance??? Pin
rchildress21-Jun-02 2:58
rchildress21-Jun-02 2:58 
AnswerRe: ASPNET local user = acceptable performance??? Pin
Andy Smith21-Jun-02 12:16
Andy Smith21-Jun-02 12:16 
Generalmore efficient to get right directory's fullname Pin
ygxdha21-Jun-02 1:33
ygxdha21-Jun-02 1:33 
Windows operating system's file name is not case-sensitive.
I have a directory which path is "C:\Test\SubDirectory",
but now i can only get the string "c:\test\subdirectory",
i want to get its origial path.
so i use the following code:

DirectoryInfo dir = new DirectoryInfo("c:\test"); \\i get this string from "c:\test\subdirectory"
DirectoryInfo[] dirInfo = dir.GetDirectories();
foreach(DirectoryInfo temp in dirInfo)
{ //but the temp.FullName are all begian with string "c:\test" .
// what i want to get is "C:\Test"
.....

}


because i can't get right result.
I change my code as following:
DirectoryInfo dir = new DirectoryInfo("C:\");//i just can be sure of the driver name in uppercase
DirectoryInfo[] dirInfo=dir.GetDirectories();
foreach(DirectoryInfo temp in dirInfo)
{
.....//i can get string "C:\Test\SubDirectory " after i get String "C:\Test"
}

I find out that service DirectoryInfo.GetDirectories() just add file name after its object's attribute named "FullName" .
If the object's "FullName" is not case-sensitive. I can't get subdirectories' right path use service GetDirectories();
To get the right path, i had to extract subdirectory begin with Driver.It's not a efficient way.Who can give me some efficient way?



GeneralRe: more efficient to get right directory's fullname Pin
Chris Rickard21-Jun-02 4:16
Chris Rickard21-Jun-02 4:16 
QuestionDirectX and C# ? Pin
20-Jun-02 22:40
suss20-Jun-02 22:40 
AnswerRe: DirectX and C# ? Pin
21-Jun-02 6:10
suss21-Jun-02 6:10 
GeneralRe: DirectX and C# ? Pin
Not Active21-Jun-02 6:23
mentorNot Active21-Jun-02 6:23 
AnswerRe: DirectX and C# ? Pin
Not Active21-Jun-02 6:25
mentorNot Active21-Jun-02 6:25 
GeneralRe: DirectX and C# ? Pin
SimonS22-Jun-02 0:46
SimonS22-Jun-02 0:46 
GeneralRe: DirectX and C# ? Pin
Anonymous11-Sep-02 12:55
Anonymous11-Sep-02 12:55 
GeneralRe: DirectX and C# ? Pin
leppie12-Sep-02 5:28
leppie12-Sep-02 5:28 
GeneralMy IE cannot open *.asmx file :( Pin
Feng Qin20-Jun-02 22:15
Feng Qin20-Jun-02 22:15 
GeneralRe: My IE cannot open *.asmx file :( Pin
Chris Rickard21-Jun-02 3:47
Chris Rickard21-Jun-02 3:47 
GeneralRe: My IE cannot open *.asmx file :( Pin
Feng Qin21-Jun-02 4:17
Feng Qin21-Jun-02 4:17 
GeneralRe: My IE cannot open *.asmx file :( Pin
Chris Rickard21-Jun-02 4:41
Chris Rickard21-Jun-02 4:41 
GeneralRe: My IE cannot open *.asmx file :( Pin
Brian Olej21-Jun-02 6:31
Brian Olej21-Jun-02 6:31 
GeneralRe: My IE cannot open *.asmx file :( Pin
Feng Qin25-Jun-02 22:33
Feng Qin25-Jun-02 22:33 
GeneralPlease HELP Pin
20-Jun-02 14:29
suss20-Jun-02 14:29 
GeneralJava is free Pin
20-Jun-02 13:09
suss20-Jun-02 13:09 
GeneralRe: Java is free Pin
Nemanja Trifunovic20-Jun-02 13:14
Nemanja Trifunovic20-Jun-02 13:14 

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.