Get Current Directory : Directory « File Directory Stream « C# / CSharp Tutorial

C# / CSharp Tutorial
1. Language Basics
2. Data Type
3. Operator
4. Statement
5. String
6. struct
7. Class
8. Operator Overload
9. delegate
10. Attribute
11. Data Structure
12. Assembly
13. Date Time
14. Development
15. File Directory Stream
16. Preprocessing Directives
17. Regular Expression
18. Generic
19. Reflection
20. Thread
21. I18N Internationalization
22. GUI Windows Forms
23. 2D
24. Design Patterns
25. Windows
26. XML
27. ADO.Net
28. Network
29. Directory Services
30. Security
31. unsafe
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
C# / CSharp Tutorial » File Directory Stream » Directory 
15. 15. 4. Get Current Directory
 

using System;
using System.IO;

static class MainClass
{
    static void Main()
    {
        Console.WriteLine("Using: " + Directory.GetCurrentDirectory());
    }
}

        
Using: C:\Java_Dev\WEB\dev\CSharp
  
15. 15. Directory
15. 15. 1. Get the files from the root directory
15. 15. 2. Use file filer on a directory
15. 15. 3. Directory.Exists
15. 15. 4. Get Current Directory
15. 15. 5. Get relative path
15. 15. 6. Changing current directory to c:\\
15. 15. 7. Delete Directory
15. 15. 8. Directory Attributes
15. 15. 9. Use DirectoryInfo to create sub directory
15. 15. 10. List directory under a directory
15. 15. 11. List files under a directory
15. 15. 12. All Directories traverses all sub-directories under the root
15. 15. 13. Traverse all files under the root
15. 15. 14. Recursive Directory use
15. 15. 15. Get DirectoryInfo from FileInfo: name, parent directory name, directory exists
15. 15. 16. DirectoryInfo: creation time, last write time, last access time
15. 15. 17. DirectoryInfo: Directory attribute list and Directory contains
w___w__w_._j__a_va2s.___c_om | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.