Tutorials - C#, WPF, ASP.NET MVC, WCF, Entity Framework, AngularJS and MVVM Frameworks - MVVM Light

C# params

C# params allows you to design a method which accepts variable number of parameters. These parameters are stored in an array and available to called method. static void DoWork(params int[] arr) { if (arr != null) { foreach (var i in arr) { Console.WriteLine(i); } } } There are two ways to send parameters using params keyword: You can fill ...

Continue Reading

C# using statement - Why and How?

This article is an introduction to the C# using statement and explain why and how to use it. I'll also describe features of using statement and examples of nested using. In C#, every object is using some resources managed or unmanaged internally. Client is responsible for life cycle of the object. Life cycle of the object means creation or destroying the object...

Continue Reading

C# Versions and Features

C# versions C# 1 comes in 2002 with .NET framework 1.0 and Visual Studio 2002 C# 2 comes in 2005 with .NET framework 2.0 and Visual Studio 2005 C# 3 comes in 2008 with .NET framework 2.0 and Visual Studio 2008 C# 4 comes in 2010 with .NET framework 4.0 and Visual Studio 2010 C# 5 comes in 2012 with .NET framework 4.5 and Visual Studio...

Continue Reading

Directives - AngularJS

AngularJS Directives are indicators to AngularJS compiler to attach some behaviour to HTML DOM elements. AngularJS comes with some built-in directives but you can create your own custom directive. Some main AngularJS directives are: ng-app ng-bind ng-class ng-init ng-model ng-switch ng-repeat ng-app Directive The ng-app directive is used fo...

Continue Reading

Environment Setup - AngularJS

For create an AngularJS application, you need to include AngularJS javascript file into your application. First download the latest AngularJS javascript file. There are two ways you can include the AngularJS javascript file in your application. Download AngularJS javascript file directly from AngularJS site Include AngularJS javascript file from Google CDN ...

Continue Reading

Filters - AngularJS

AngularJS Filters is used for change the format of the expression result. Filters are applied directly on expressions. AngularJS Filter Syntax {{ expression | filter1:arg1,arg2 | filter2:arg1,arg2 }} Filters use the pipe (|) character for its syntax. Main AngularJS Filters currency number lowercase uppercase json date orderBy limitTo...

Continue Reading

Flyweight Design Pattern

Flyweight design pattern supports sharing of objects. In project, sometimes we have similar kinds of objects. Each object have two types of data. Intrinsic: This data is unique in all objects. Extrinsic: This data is common in all objects. Flyweight pattern gives you a pattern to design these objects lightweight by sharing the extrinsic data to an ex...

Continue Reading

Forms - AngularJS

AngularJS provides great way to create Forms which submit their data without postback. AngularJS Forms use two directives: ng-model: The ng-model directives is used for binding input controls to Javascript Objects. ng-submit: Bind AngularJS Controller submit function to submit event of HTML Form. It also prevents the form to submit to server directly. Angu...

Continue Reading

Hello World Sample Application - AngularJS

An AngularJS application is divided into two parts: Application Bindings AngularJS Application An AngularJS application defines the section of HTML that starts the AngularJS application. We define the application using the ng-app attribute. You can add this attribute with any HTML element like body, div, table. <body> <div ng-app> <...

Continue Reading

WCF Hello World Example

WCF is very popular platform for developing services. In this blog, we'll create a very basic and simple example of WCF service in just 6 steps. Steps are: Declare ServiceContract Declare DataContract Implement Service Configure Service Host Service Access Client Declare ServiceContract Create a new blank Console solution and name the soluti...

Continue Reading

Join our newsletter and get an occasional email with a technology and dotnetpattern.com news update.