Read file extension c#
This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Is this page helpful? Please rate your experience Yes No. Any additional feedback? The following example demonstrates using the GetExtension method on a Windows-based desktop platform.
This method obtains the extension of path by searching path for a period. If a period is found before a DirectorySeparatorChar or AltDirectorySeparatorChar character, the returned string contains the period and the characters after it; otherwise, String.
Empty is returned. The extension of the specified path including the period, ". This method obtains the extension of path by searching path for a period ".
Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. ReadAllLines file ;. WriteLine ln ;. WriteLine line ;. Close ;. ReadKey ;. WriteAllText file, text ;. WriteAllLines file, textLines1 ;. WriteAllText file, text1 ;. AppendAllText file, text2 ;. Previous File. AppendText Method in C with Examples. Next Basics of File Handling in C. Recommended Articles. Article Contributed By :. Easy Normal Medium Hard Expert. Writing code in comment?
Please use ide. Load Comments. What's New. Most popular in C. NET Framework. More related articles in C. NET Core and.
0コメント