Get file full name in CSharp

Description

The following code shows how to get file full name.

Example


using System;/*  w  ww  .j a  va  2s.  c  om*/
using System.IO;

public class MainClass
{
    public static int Main(string[] args)
    {      
    FileInfo f = new FileInfo(@"C:\Test.txt");
    FileStream fs = f.Create();

    Console.WriteLine("Full name: {0}", f.FullName);
    Console.WriteLine("Full atts: {0}", f.Attributes.ToString());

    fs.Close();
    f.Delete();      

        return 0;
    }
}




















Home »
  C# Tutorial »
    IO »




File Attribute
File Security
Directory Attribute
Directory Recursive
Binary File
Text Field
Buffered IO
Create Copy Delete Move
CSV
Drive
File System Watcher
Isolated Storage
MemoryStream
Serialize
Zip