File Operations samples and examples

You can make money from this site by posting original and quality articles that comply with Google AdSense policies.. Also, we offer several other reward programs including monthly profit sharing, cash rewards per post, contests & prizes etc to contributing members.

Submit Your Article


Get Previous versions metadata in Moss 2007 using web service RPC Method

Recently I'm facing a typical issue while get the metadata of previous versions, since I'm using Moss 2007 we don't have much options to get it. So, I'm research what are all the ways to achieve this, initially I go with Versions web service but we get only few properties so skip this approach and after several researches then I come to know that we have 2 ways to achieve this in Moss 2007.

How to capture all the comments from class files (.cs) using C#?

User can maintain a log for all comments present in the class file. This will be used for maintainance purpose. Clean up activities can be done on basis of comments log. User can add/delete required comments data. You can also put different filters. I hope it will be useful.

Create Excel File using ASP.NET C#

Create Excel File using ASP.NET C# , by writing only some code of lines ,this is very easy code for generating Reporting using without third party control.

How to resize a image file using C#

In this article I have shown that how to resize any image file by using only a function 'ResizeImageFile' in C# programming language. Only you need to put the source image file, your desired width & height of image file as parameter of this function, then it will return your expected resized image file.

Search if text is present in a file

Hi, in this article I will show you how to find whether a text is present in a file or not ,and how to use them in the code,you can use the below code snippet to accomplish the task, It needs System.IO StramReader to read the file and Contains() to check the string

Reading and writing data using StreamReader and StreamWriter classes

This code snippet shows Reading and writing data using StreamReader and StreamWriter classes. We are using File class to create a text file so that we can read and write the data to that text file. StreamReader class is used to read the data from the text file and StreamWriter class is used to write the data to the text file.

How to perform different operations on files in c#

In this we will create a text document and perform write and read operation on it. If we click on write button file is created with the data in the textbox. And during read operation it will read the data in the file and display it in the textbox.

How to use openfile dialog box

In this we will work with openfile and savefile dialogbox. Openfile will open openfile dialogbox and by choosing a file we can open that file and display the text in richtextbox. And when we click savefile it will open savefile dialogbox and we can save the text written in richtextbox.we can save it according to the required extension.

Working with directories in Windows Application

We will do coding coding for creating directories, get list of file in particular directory and also get list of directory in selected drive. During the form load list of drive is shown in the Combobox. And then we perform different operations like creating directory in a selected drive.We can get the list of directories in a selected drive. And also get list of files in the selected directory of the selected drive.

Submit Your Article