عرض المشاركات من فبراير, 2015

How to create instance of generic class using reflection

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…

How to host wcf service in IIS using Tcp protocol

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…

Todo App using Web API and Knockout

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. …

How to convert DataSet to List

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 > …

Self host web API

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…

How to create Fibonacci series using Linq

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 …

Compare Linq and Ruby Part1

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…

How to post data using HttpClient

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 …

تحميل المزيد من المشاركات
لم يتم العثور على أي نتائج