How to use RailPNRAPI to get PNR Status?

Here I’m sharing the sample code on How to consume API provided by railpnrapi.com to query Indian Railway PNR status: Register yourself on http://www.railpnrapi.com/ and get/generate API Key & API Secret. using Newtonsoft.Json;using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Net;using System.Security.Cryptography;using System.Text; namespace RailPnrAPI_SampleCode{    class Program    {        static void Main(string[] args)    … Read moreHow to use RailPNRAPI to get PNR Status?

Use of Coding Standards in Programming

If you’re working in a team and use Visual Studio for development then here are few guideline tips on how you could improve the pace and maintain the uniformity among all your team champs. Even if you’re working alone, it will help you to stay on a track rather moving on different track as you go further hence allow you to … Read moreUse of Coding Standards in Programming

A new guard page for stack cannot be created- ASP.NET MVC4 Error

An hour back I was working with ASP.NET and encountered with this pretty error. I kept wandering for about ten minutes what really has happened. My iisexpress.exe was automatically shut down and it didn’t work when I kept hitting CTRL+F5. How I solved it:Later i the process I came to know that I had the … Read moreA new guard page for stack cannot be created- ASP.NET MVC4 Error

How to convert Visual FoxPro DBF file to Excel in C#

The very first thing as you go start doing this stuff, make sure you’ve downloaded and installed Visual FoxPro Driver on your host machine. Here the link for download: http://www.microsoft.com/en-us/download/confirmation.aspx?id=14839 Use OleDbConnection to get the records into DataTable and later export/write the DataTable to Excel. Here are the complete codes: using System; using System.Data; using System.Data.OleDb; using System.IO; using Excel = Microsoft.Office.Interop.Excel; … Read moreHow to convert Visual FoxPro DBF file to Excel in C#

How to handle negative TimeSpan value in C#?

I had problems with casting TimeSpan object to DateTime. Error occured: FormatException (“the input string was not in proper format”).Code I tried:DateTime.Parse(record.Field(“Hours”)); // raised errorHere record is a DataRow object and I’m using Linq to Objects to parse the Date.//Field actual value :”{-06:25:00}”How did I overcome?I used .Duration() method of TimeSpan object.DateTime.Parse(record.Field(“Hours”).Duration()); HTH 🙂

What is CLR (Common Language Runtime)?

CLR is a part of .NET Framework which manages the execution of several supported .NET languages, allowing them to share Common Object-Oriented Classes. CLR is somewhat comparable to Java Virtual Machine. Microsoft refers to its Common Language Runtime as “Managed Execution Environment“. CLR held responsible for these important activities: Garbage Collection: CLR automatically manages memory, thus eliminating … Read moreWhat is CLR (Common Language Runtime)?

What is Native Image Generator (Ngen.exe) and how does it work?

Ngen.exe (Native Image Generator) is a tool that creates native images, which are files containing compiled Processor-Specific machine code, and installs them into the native image cache on the local computer. It’s a tool that improves the performance of managed applications. In other words, rather than compiling the code dynamically using JIT on runtime, a … Read moreWhat is Native Image Generator (Ngen.exe) and how does it work?