Use static methods in Path : Path : File Stream C# Source Code


Custom Search

C# Source Code » File Stream » Path »

 

Use static methods in Path








    
 

using System;
using System.Diagnostics;
using System.IO;
class TestPathApp {
    static void Main(string[] args) {
        Process p = Process.GetCurrentProcess();
        ProcessModule pm = p.MainModule;
        string s = pm.ModuleName;

        Console.WriteLine(Path.GetFullPath(s));
        Console.WriteLine(Path.GetFileName(s));
        Console.WriteLine(Path.GetFileNameWithoutExtension(s));
        Console.WriteLine(Path.GetDirectoryName(Directory.GetCurrentDirectory()));
        Console.WriteLine(Path.GetPathRoot(Directory.GetCurrentDirectory()));
        Console.WriteLine(Path.GetTempPath());
        Console.WriteLine(Path.GetTempFileName());
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo File Stream
» Path