This web site uses cookies. By using the site you accept the cookie policy.This message is for compliance with the UK ICO law.

<< Previous | 1 | 2 | 3 | 4 | 5 | Next >> |
Enabling and Disabling File CompressionEnabling and Disabling File Compression
Microsoft Windows allows files to be compressed on disk to save space, at the expense of some performance. Using the .NET framework and Platform Invocation Services, the compression status can be changed programmatically.
Reading Fixed-Width DataReading Fixed-Width Data
Fixed-width formats provide an alternative to comma-separated values (CSV) when text files must be used to transfer information between systems. When reading such files, field data is extracted according to its horizontal position in the text.
Creating CSV FilesCreating CSV Files
Comma-separated values (CSV) files can be used to transfer information between systems that support no other common interface. CSV files can be read using standard functionality from the .NET framework but creating them requires a custom class.
Reading CSV DataReading CSV Data
CSV files are useful for transferring information between systems that cannot be connected by another method. Reading the data from CSV files, or strings containing CSV information, is made easy with standard .NET framework classes.
Folder Recursion with C#Folder Recursion with C#
Some applications must read the folder structure beneath an existing folder or for an entire disk or attached device. The standard method in the Directory class can cause problems when used in this way. An alternative is to recursively read the folders.
File and Folder TimestampsFile and Folder Timestamps
Microsoft Windows maintains three timestamps for all files and folders. These are the creation time and the times that the item was last accessed and updated. These timestamps can be accessed and updated using the .NET framework.
Controlling File Attribute FlagsControlling File Attribute Flags
Microsoft Windows allows a number of Boolean attributes to be assigned to each file in the file system. These flags provide information such as indicating that a file is hidden or read-only. The properties can be read and changed using the .NET framework.
Capturing Ctrl-C in Console ApplicationsCapturing Ctrl-C in Console Applications
Console applications can be exited by the user by pressing Ctrl-C or Ctrl-Break. During multiple step operations that could leave the system in an inconsistent state, these commands should be intercepted to allow for graceful and safe exiting.
Basic Folder OperationsBasic Folder Operations
Some applications that perform file access also require the ability to manipulate the folder structure, or directory structure, within the file system. The Directory class provides many static methods, including some that perform basic folder operations.
Reading and Writing INI FilesReading and Writing INI Files
Initialisation files known as INI files provide a standard means for storing configuration information for software in a text file. Although rarely used by .NET applications, there are situations where these files must be read and written to using C#.
<< Previous | 1 | 2 | 3 | 4 | 5 | Next >> |