Scroll to top

.NET Framework


Category

.NET Framework : Dictionaries

Enumerating a Dictionary You can enumerate through a Dictionary in one of 3 ways: Using KeyValue pairs Dictionary<int, string> dict = new Dictionary<int,…

Curious Bot December 1, 2018

.NET Framework : LINQ

LINQ (Language Integrated Query) is an expression that retrieves data from a data source. LINQ simplifies this situation by offering a consistent model for working…

Curious Bot December 1, 2018

.NET Framework : Networking

Basic TCP chat (TcpListener, TcpClient, NetworkStream) using System; using System.IO; using System.Net; using System.Net.Sockets; using System.Text; class TcpChat…

Curious Bot December 1, 2018

.NET Framework : NuGet packaging system

Installing the NuGet Package Manager In order to be able to manage your projects’ packages, you need the NuGet Package Manager. This is a Visual Studio Extension,…

Curious Bot December 1, 2018

.NET Framework : Networking

Basic TCP chat (TcpListener, TcpClient, NetworkStream) using System; using System.IO; using System.Net; using System.Net.Sockets; using System.Text; class TcpChat…

Curious Bot December 1, 2018

.NET Framework : Reflection

What is an Assembly? Assemblies are the building block of any Common Language Runtime (CLR) application. Every type you define, together with its methods, properties…

Curious Bot December 1, 2018

.NET Framework : NuGet packaging system

Installing the NuGet Package Manager In order to be able to manage your projects’ packages, you need the NuGet Package Manager. This is a Visual Studio Extension,…

Curious Bot December 1, 2018

.NET Framework : Dictionaries

Enumerating a Dictionary You can enumerate through a Dictionary in one of 3 ways: Using KeyValue pairs Dictionary<int, string> dict = new Dictionary<int,…

Curious Bot December 1, 2018

.NET Framework : Reflection

What is an Assembly? Assemblies are the building block of any Common Language Runtime (CLR) application. Every type you define, together with its methods, properties…

Curious Bot December 1, 2018

.NET Framework : Collections

Creating an initialized List with Custom Types public class Model { public string Name { get; set; } public bool? Selected { get; set; } } Here we have a Class with…

Curious Bot December 1, 2018

.NET Framework : XmlSerializer

Serialize object public void SerializeFoo(string fileName, Foo foo) { var serializer = new XmlSerializer(typeof(Foo)); using (var stream = File.Open(fileName, FileMode.Create))…

Curious Bot December 1, 2018

.NET Framework : XmlSerializer

Serialize object public void SerializeFoo(string fileName, Foo foo) { var serializer = new XmlSerializer(typeof(Foo)); using (var stream = File.Open(fileName, FileMode.Create))…

Curious Bot December 1, 2018

.NET Framework : HTTP clients

Reading GET response as string using System.Net.HttpWebRequest string requestUri = "http://www.example.com"; string responseData; HttpWebRequest request…

Curious Bot December 1, 2018

.NET Framework : HTTP clients

Reading GET response as string using System.Net.HttpWebRequest string requestUri = "http://www.example.com"; string responseData; HttpWebRequest request…

Curious Bot December 1, 2018

.NET Framework : Exceptions

Catching an exception Code can and should throw exceptions in exceptional circumstances. Examples of this include: Attempting to read past the end of a stream Not…

Curious Bot December 1, 2018

.NET Framework : Exceptions

Catching an exception Code can and should throw exceptions in exceptional circumstances. Examples of this include: Attempting to read past the end of a stream Not…

Curious Bot December 1, 2018