VOOZH about

URL: https://www.geeksforgeeks.org/c-sharp/c-sharp-program-to-demonstrate-the-use-of-fullname-property/

⇱ C# Program to Demonstrate the Use of FullName Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

C# Program to Demonstrate the Use of FullName Property

Last Updated : 1 Feb, 2022

DirectoryInfo class provides different types of methods and properties that are used to perform operations on directories and sub-directories like creating, moving, etc and FullName property is one of them. This property is used to find the full path of the directory or the specified file.

Syntax:

public virtual string FullName { get; }

Return: It will return a string that contains the full path of the current directory or file.

Exception: This property will throw the following exceptions:

  • PathTooLongException: This exception will occur when the path and the file name exceed the system-defined maximum length.
  • SecurityException: This exception will occur when the caller doesn't have enough permissions.

Example:

Output:

FullName
/home/cg/root/8057718/vignan
Comment
Article Tags:
Article Tags:

Explore