Home Notices Documents Classes Download Others Rice
Classes  >  file  >  Extension
file class : Extension getter

Description

Gets a string that represent the extension part of the file.

Syntax

fileInstance.Extension

Arguments

None

Return value

ClassDescription
stringExtension part of the file.

Sample code

1:

file f = new file("c:\somewhere...\some.txt");

2:

string extention = anyFile.Extension; // The extention is ".txt";

Notes

It's a wrapper of the System.IO.FileInfo.Extension property.

Please aware that the period (.) is included in the result.

Links for reference

Copyright © Rice All rights reserved.