Year: 2014
-
C# basics: why we override Equals method
You may have come across questions, Why to override Equals method? How to determine whether two object are equal? How to determine whether two objects are identical? To get answer of all the above questions, let us consider Product class as listed next: We are creating two instances of the Product class, foo and…
-
C-Sharp Basics: What is Checked and Unchecked operations
You may have come across questions, What is checked and unchecked primitive operations? How to handle overflow in C-Sharp? Does CLR handles overflow or developers? So let us start with understanding a program. Consider the code listed below: On running you will get 44 as the output. There is one serious observation about the…
-
How to create a Container in Azure Storage from MVC application
I am working on a MVC application in which I need to work with Microsoft Azure storage .I had a requirement to create An Azure storage container from the MVC application. In this post I will share my learning that how I created a container programmatically. I created the view as shown in below image.…
-
Related entities in Entity Framework Code First approach
In this post we will learn to create relationship between entities in the Entity Framework Code First approach. Setting up We are going to create three tables and set up the relationship between them. BankUser BankUserAccount Nomniee To create tables we will create entities further in the post. For table creation the context class has…
-
How to Clone a Git repository in Visual Studio
In my trainings, often I get a question from junior developers that how to clone a Git repository in the visual studio? Perhaps it may be very simple for senior developers, however for the developers who struggle to get it right steps are discussed below, Step 1 Find the URL of the remote git repository.…
-
Capture photo and save on the disk in WinJS based Windows Store App
In this post we will learn to capture a photo and save the captured photo on the disk. You can work with camera and capture a photo in the WinJS using the Windows.Media.Capture.CameraCaptureUI(). Let us start with creating the UI for the application. In the UI, we will have Application bar with two buttons One…
-
Classes in WinJS
Even if we have heard many times about the classes in the JavaScript, it is not an object oriented language. Rather JavaScript is a prototypal language. Working with classes in JavaScript can be but cumbersome syntactically. WinJS is a JavaScript library and it reduced the syntactical complexity of working with classes. In this post we…
-
Data Binding and Observable in WinJS
Source code on GitHub In this post we will learn how to work with the data binding and observable class in the Windows Store application created using WinJS. We will learn to work with Data binding Two way data binding Observable object By default WinJS Provides one way binding When the data source is updated…