C# BinaryReader Tutorial With Programming Examples And Codes

If you have bin file stored in your PC and you want to read them then BinaryReader may help you lot. BinaryReader class is used to reading binary files. A binary file stored data in different layout that is more efficient for machine but not convenient for human. BinaryReader makes this job simpler and show you exact data stored in bin […]

Continue Reading →
 

C# BinaryWriter Class With Programming Examples And Codes

BinaryWriter class writes Primitive type data type as int, uint or char in binary to a stream. As its name says BinaryWriter writes binary files that uses a specific data layout for its bytes. BinaryWriter create binary file that is not human understandable but the machine can understand it more smoothly. It supports writing string in a specific encoding. BinaryWriter class provides methods that simplify writing […]

Continue Reading →
 

C# TextReader Class With Programming Example

TextReader Class represents a reader that can read a sequential series of Characters. It is abstract class that means you cannot instantiate it. After finishing reading or writing file you must disposeor clean memory directly or indirectly. To directly dispose, call Dispose Method in try/catch block and for indirectly disposal write code inside using block. Programming Examples: In this programming Example I will open D:\csharpfile.txt using […]

Continue Reading →
 

C# TextWriter Tutorial With Programming Examples

The TextWriter class represents a writer that can write sequential series of characters. You can also use this class to write text in a file. It is an abstract base class of StreamWriter and StringWriter, which write characters to streams and string respectively. Example: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using […]

Continue Reading →
 

C# StreamReader Class With Programming Example

StreamReader class allows you to read text files very easily. Its implementation is very easy and it is most popular among the programmer. However, there are many of way to read text file in C# file handling but StreamReader Class is more popular in list. Important Points about StreamReader Class Implements a TextReader that reads characters from […]

Continue Reading →
 

C# FileStream Tutorial With Programming Example

FileStream Class is used to execute the basic operation of reading and writing operating system files. FileStream class helps in reading from, writing and closing files. In order to use FileStream class you need to include System.IO namespace and then create FileStream Object to create a new file or open an existing file. FileStream <object_name> […]

Continue Reading →
 

Constructors And Destructors – C# Basic Programming

Constructors and Destructors are the very small chapter in C# and can be learned easily. It is easy to understand concept of constructors and destructors. What are Constructors and Destructors in C#? Constructors: Constructors are the special method of class which is used when create object. It like  to method but it has same name as […]

Continue Reading →