- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
C# Program to display temporary file names
The GetTempPath() method in C# displays temporary file names −
Path.GetTempPath();
Get the names in a variable and display −
string tempFile = Path.GetTempPath();
The following is the code −
Example
using System; using System.IO; class Demo { static void Main() { string tempFile = Path.GetTempPath(); Console.WriteLine(tempFile); } }
Output
/tmp/
Advertisements