Stream reader and stream writer:
C# includes following standard IO (Input/Output) classes to read/write from different sources like a file, memory, network, isolated storage, etc.
System.IO.Stream is an abstract class that provides standard methods to transfer bytes (read, write, etc.) to the source.
Classes that need to read/write bytes from a particular source must implement the Stream class.
The following classes inherits Stream class to provide functionality to Read/Write bytes from a particular source:
FileStream: reads or writes bytes from/to a physical file whether it is a .txt, .exe, .jpg or any other file. FileStream is derived from the Stream class.
MemoryStream: MemoryStream reads or writes bytes that are stored in memory.
BufferedStream: BufferedStream reads or writes bytes from other Streams to improve the performance of certain I/O operations.
NetworkStream: NetworkStream reads or writes bytes from a network socket.
PipeStream: PipeStream reads or writes bytes from different processes.
CryptoStream: CryptoStream is for linking data streams to cryptographic transformations.
Readers and Writers:
StreamReader: StreamReader is a helper class for reading characters from a Stream by converting bytes into characters using an encoded value. It can be used to read strings (characters) from different Streams like FileStream, MemoryStream, etc.
StreamWriter: StreamWriter is a helper class for writing a string to a Stream by converting characters into bytes. It can be used to write strings to different Streams such as FileStream, MemoryStream, etc.
BinaryReader: BinaryReader is a helper class for reading primitive datatype from bytes.
BinaryWriter: BinaryWriter writes primitive types in binary.
Mobile automation testing
Components of the .Net framework
Input and output statements
Boxing and Unboxing
Var vs Dynamic vs Object
Auto property initializer.
New way for Exception filters.
await in catch and finally block.
Null – Conditional Operator.
Expression – Bodied Methods
Easily format strings – String interpolation
Parameterless constructors in structs.
Creating a custom exceptions class.