Links to .NET books

This is a recommended list of books for those programmers working on technologies related to Microsoft .NET platform.

I will be adding the .NET books as well as those related interview questions as a handy reference for me and friends. The list will be updated on a regular basis. Feel free to comment if you know of a good book that is not present in the list.

C# complete Reference 3.0

C# complete Reference 4.0 (new version)

C# Pocket reference – a short and handy reference guide

ASP.NET MVC Interview questions

ASP.NET MVC Interview Questions and Answers

Douglas Crockford’s book “JavaScript: The Good Parts” is a must read for a developer working on front-end.

JavaScript in 10 mins

More free programming books at


Concatenate multiple rows for a column using LINQ

Note: I wrote this post after I encountered a programming problem.

Lets say I have 4 columns in DB2 table called “Table1”-

Id (int)

Code (varchar)

SequenceNumber (int)

Message (varchar)

Id, Code and SequenceNumber act as a unique key for this table.

Data is stored in this table using following condition:

For each Id and Code, if message size exceeds column MAX size,

then the message is split and stored in multiple rows using SequenceNumber in incremental form.


Consider this table has following data:

Id Code SequenceNumber Message
1 ABC 1 test1
1 ABC 2 test2
2 XYZ 1 message1
2 XYZ 2 message2
3 PQR 1 hello

The requirement is to concatenate messages for all sequence numbers in Message column, for each row which has unique combination of {Id and Code}.

So my required table should have following columns-



Message (concatenated messages)

Id Code Message
1 ABC test1 test2
2 XYZ message1 message2
3 PQR hello

Please note that SQL CONCAT function concatenates two strings or two column values. Here we want to concatenate column values across rows.

I am not sure if this requirement can be programmed using SQL query. We had this exact requirement in our project and I used LINQ to implement it.

Here are the steps I used in VB.NET (it being the programming language used in our project)-

1) Connect to DB2

2) Fetch all data from Table1 and store it in DataTable called “dt”. This DataTable has 4 columns – Id, Code, SequenceNumber and Message.

3) Write LINQ query to concatenate data as per the requirement. Here is the VB.NET code

Dim query = From r In dt _

Order By r.Field(Of Short)(“SequenceNumber”) Ascending _

Group r By ID = r.Field(Of String)(“Id”), _

Code = r.Field(Of String)(“Code”) _

Into g = Group _

Select New With { _

Key ID, Code, _

.MESSAGE = String.Join(“”, g.Select(Function(a) a.Field(Of String)(“Message”)).ToArray())}

Note that grouping is done on columns “Id” and “Code” and rows are ordered in ascending order for column “SequenceNumber”.

I used String.Join to concatenate the values in Message column.

4) “query” object is an IEnumerable collection. I can iterate over it using “for each” loop and extract the data or perform further processing.

I would be delighted to see a better/improved approach to implement this requirement.

Utility to list Programs in Add/Remove Programs

I wanted a simple utility to create a list of all programs listed in Add/Remove Programs on my laptop. I searched on net for the utility and got a vbscript code for the same. However I tweaked it to my personal taste. Here is the code:

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Product",,48)

For Each objItem in colItems
WScript.Echo objItem.Name

Write this code in a text editor and save the file with the extension .vbs. Open command prompt, navigate to the directory where you saved the .vbs file. Type following command :

cscript temp.vbs  > temp2.txt

Open temp2.txt and you will see the list of programs as follows:

Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Feedback Tool
Windows Media Player Firefox Plugin
Microsoft Visual Studio 2010 Service Pack 1
Adobe Common File Installer

By default, cscript command displays a logo when the script runs under CScript. The logo, which appears prior to any of the output from the script, looks like this:Microsoft (R) Windows Script Host Version 5.6Copyright (C) Microsoft Corporation 1996-2000. All rights reserved.

You can get rid of the logo using //nologo option as follows:

cscript //nologo temp.vbs  > temp2.txt


This utility lists the programs that were installed using Windows Installer. That was my requirement. You can tweak it to lists programs installed using other installers too.

More about the Win32_Product WMI class is given on MSDN.

.NET tools/projects on codeplex

Here are some of the open source projects/tools developed in .NET which are available on codeplex:

1)      Silverlight Audio Player

2)      Managed Extensibility Framework – New in .NET framework 4.0, this framework can be used for creating extensible applications and components.

3)      MEF Visualizer Tool – Helps to see what is going on inside the MEF Composition Container. A visualization tool for MEF.

4)      .NET Gadgeteer – a rapid prototyping system for pluggable modules in place of plugging in electronic devices. The end user site is at To learn more, check out a Channel 9 Video on it.

Check out more on CodePlex.

Yahoo! Big Thinkers India Series in Pune

Yahoo! Research conducts a series of lectures quarterly under the Yahoo! Big Thinkers India Series. The lectures are conducted in Bangalore, however for the first time Yahoo hosted the April 2011 lecture outside Bangalore, in LeMeridian hotel in Pune. The lecture titled ‘web retrieval: The surprising role of users’ was conducted by Yeolle Maarek -a senior Director of Yahoo! Research.

Yeolle explained the role of users in a pretty nice way-it reminded me of film 21 in which Professor Micky Rosa (Kevin Spacey) puts up a stupendous job in his opening scene of the class.

Although the session was scheduled on a weekday (yersterday), we went to attend the session. The session proved to be a catalyst to think about something that we as web users should care about and was a good lecture in terms of content as well as presentation rather than those boring  meetings. Apart from this, the attendees got a nice and heavy snacks-the snacks in LeMeridian was really tasty, a key chain and a Yahoo! diary:) I know some people came solely for these things 😉

I hope the video of the session will be available on Bigthinkers site soon. The recorded sessions of previous lectures are available in the archives.

The top ten technology trends to watch out for

Dr. Anand Deshpande, M.D. of Persistent Systems Ltd, write an article on “the top ten technology trends to watch out for” in InformationWeek. This is a must read article for anyone interested in knowing the future technology trends.

Here is the link of the article-

Atul Kahate on Evolution of Open Source Movement

Atul Kahate gave a talk on evolution of Open Source movement as a part of the Computer Society of India (CSI) lecture series yesterday. I was curious to meet the person more than listening to his lecture. The reason being, in BE we had a subject called ‘Web Technologies’. The textbook was titled with the same name and co-authored by Achyut Godbole and Atul Kahate.

He started with brief history of major milestones in the field of computing and computer science and the lives of those who have contributed to it. He confidently gave the presentation, the flow was awesome, but when it came to Q&A, he seemed to be fumbled while answering the questions raised by audience.

Achyut Godbole is an entrepreneur and during this illustrative career, he has contributed in building of companies such as Patni, Syntel, Apar Technologies, Disha Technologies. At present he is the Managing Director of “Softexcel Consultancy Services”. Besides, his career as a technocrat, he is deeply involved in Music and Book Writing. He has been awarded “Udyogratha” by Indian Economic Council for his contribution to Information Technology and “Kumar Gandharva Award” by Pandit Bhimsen Joshi for his contribution to music and computers. He used to write about history (or perhaps some other subject) in a weekly column in (probably) Loksatta (a Marathi newspaper) and used to eagerly read them. I searched on Internet for his articles, in vain. I would appreciate if anybody can point me to his articles.

Atul is Head-Technology Practice at Oracle Financial Services Software Limited. He has interest in Cricket, Music and Book Writing apart from being a visiting faculty at renowned colleges in Pune.

PS: I have started writing an article on “History of Computing” and will post it as soon as I am done.