Category Archives: C#

How to set formats into excel file from C# code

We will set “Font” , “Currency”, “Date” and “Percentage” formate into Excel from C# .
For creating excel, we will use “Microsoft.Office.Interop.Excel” dll .

Read the rest of this entry

Reflection

Hi, just thought to share little knowledge on reflection with you all, as per being a developer, I was very curious to find how visual studio is giving intellisence, that took me to learn reflection and I found its really good to know about it.so I will start with using a pattern, in this way you will get to know about two things. 🙂

Reflection and Abstract Factory pattern.
Read the rest of this entry

Extension Methods

Hello guys, in this article I would like to share some brief introduction of extension methods.
The agenda is how to create and use extension methods

Extension methods are called as if they were instance methods on extended type.

Example we have extended function like

string testString = string.Empty;
 testString.Split(',');
 testString.ToString();

and many more.

Read the rest of this entry

Introduction to OData

Web is evolving very rapidly and so we have to. And demands of generic things are increasing as well.
We all know now days no application stands alone, because there are a lot of types of devices available
So we have to create services which can be called by any kind of device and business logic can be placed at a single place.
And when it comes to fetch data from a web service method, client devices don’t always need whole data, sometimes needs few columns or sometime needs data filtered on some basis and so on.

Read the rest of this entry

Introduction to Nuget Package

It was not a long time when I moved to Visual Studio 2010 for a project and first time listen for Nuget packages and after that day by day these nuget packages became and important part of my development environment. With almost 20k unique packages from the initial release in 2010 the community expanding exponentially and now this plugin became for .net in the same way ‘RubyGems’ stays to ruby by providing a centralized repository for thousands of packages.

Nuget is a free and open source package manager for dot net framework.NuGet is distributed as  a visual studio extension, integrated with sharp developer , and included in the C# code snippet tool LINQPad. NuGet can be used from the command line and automated via scripts.

Read the rest of this entry

Microsoft ASP.Net Web Application vs Website

Introduction:
A Web application is an application that can be hosted on a web server and can be accessed from any machine that lies in the intranet or internet which has the web browser to render and display the web pages in that application.

With the help of Visual studio 2012, the web application can be created by using two different templates provided. One is by using “New Website” template and another is by using “New Web Application” template. This document is basically to compare and contrast the features of using these templates.

How to Create a New Web Application Project:

  • In Visual Studio, Select new “project “option from file menu as shown below:

Read the rest of this entry

Asynchronous Programming

Few days before I have been assigned a new project with some awesome technologies so I started learning many new things and after couple of days I just said to myself I know everything (read I am great :)), so enough for learning and now start coding. Well this happiness doesn’t last long. After few days I was sitting in office using httpClient() class and saw ‘Async’ keyword on it’s methods. I just thought how ridiculous is Microsoft. Every time I think I know everything in C# it just come up with some new things(I am so frustrated ). So out of curiosity I have started looking into this Async by goggling and reading over MSDN and this way I started a new journey to learn a new concept. So as I think it’s worth share my findings. So here we go :

Read the rest of this entry

Simple API Integration in C# to Get IP Address

What is API:Application Programing Interface provides a medium of interaction between software components. Now-a-days API programing is one of the most important components of software development. Know more about API

API is something like URL that provides some intended data to the user. Let me explain it with some real world example.

Consider you have an account in Facebook and you want to access your friend list, status, photos through codding. Here Facebook is a total different entity which has no relation with your code (application), neither you can access Facebook’s code nor its database. So how can you access those data in your FB account via your application?

Here comes the role of API, Facebook provides an interface (URL/Graph API) that gives you all the intended details of your account, those can be used in any application. So your work is just to call the API provides by the client (here Facebook) and to use the response in your application. That’s it.

Read the rest of this entry

dynamic vs var

A while ago, on a beautiful evening of a wonderful weekend I had a mug of beer in my hand and a thought striked, what’s new in C# 4.0. I searched on google and started to look into the results and suddenly I stopped to get a hang of the term ‘dynamic’, well obviously I googled again and burrowed deeper into it. After a couple of minutes (read hours) I got aquainted to the idea of ‘dynamic’ but could not understand its need as we already had ‘var’ (thanks to C# 3.0). This made me anxious and I started to look out for the need of ‘dynamic’ and the difference between ‘var and ‘dynamic’. Following are my findings

Read the rest of this entry

Barcode with SSRS

In this blog I am going to introduce Barcode with SSRS reports. Before going ahead we need to know what is Barcode. A barcode is a machine readable code that is most common now adays. It is in the form of parallel lines. These parallel lines are generated with the help of number or alphabets or with combination of both (alphanumeric). These parallel lines are separated with some distance between them depending upon need. Barcodes are printed on a commodity and used especially for stock control. Example-: 01-barcode Read the rest of this entry

%d bloggers like this: