Showing posts from February, 2015
In this post, I am going to show how to create an instance of a generic class using c# reflection. The trick is to use the MakeGenericType to make the argument(s) and then call create Instance. Here is a code snippet: Type d…
In this post, I will show you how to host WCF service in IIS using TCP protocol. By default, the TCP WCF activation service is not enabled on your machine. You can follow these steps to enable the TCP activation for WCF serv…
In this post, I am going to show you how to develop a to-do app using knockoutjs and Microsoft Web API. What is knockoutjs ”Knockout is a standalone JavaScript implementation of the Model-View-ViewModel pattern with templates. …
In this post, I am going to show you a very useful c# code snippet that converts DataSet to List. public static List < T > ToCollection < T > ( this DataTable dt ) { List < T > …
In this post, I will show you how to create a web API that runs outside the IIS application. Open visual studio and create a console application Add the Web API and OWIN Packages From the Tools menu, click Library Packag…
In this post I am going to show you how to generate fiboancci number series using Linq. What is Fibonacci series : The Fibonacci Sequence is the series of numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, … The next number is found …
In this post, I will show you how to create a simple chat application using the Microsoft SignalR framework Step1 open visual studio and create a new MVC application Step2 Select Empty MVC application Step3 Open Packag…
Linq Where equivalent in Ruby One of the most used (just guessing) LINQ methods would be Where() , in .NET allows you to provide a Lambda that is used to filter a collection of objects var ints = new [ ] { 13 , 42 , 9…
In this post, I will show you how to post data to web API using HttpClient. private static async Task PostJSON ( ) { HttpClient httpClient = new HttpClient ( ) ; HttpContent content …