C#: Why default fall-through in switch statement is not allowed?

I was working on this particular piece of logic which I saw as a multiple sieve like structure. An if-else statement which would check the value of a number and based on the value, it would also execute the code for all the values less than it.

For example, user could submit x number of projects to be processed in one request. User could add a minimum of 1 to a maximum of 5 projects in one request.

Based on the number of projects user added, I had to write a logic to check a certain value in each project form. So if user had added 3 projects, I would check project 1, 2 and 3. Continue reading

Posted in Misc | Tagged , , | Leave a comment

SharePoint 2010 State Machine Workflows with Custom Task Forms (InfoPath) using VS 2010 – Part 3 of 3


In the Part 3 of the tutorial, I will explain the process of sending data from the workflow to the task form (InfoPath). In Part 2 of the tutorial I explained retrieving the data from InfoPath form in the workflow by using the Extended Properties of the Task Properties. We will use the Task Properties object to send the data from our workflow to the InfoPath Form.

Continue reading

Posted in Misc | 1 Comment

Template Id and Template Type mapping

In continuation of the previous post, below is the Template Type and Id mapping

Template Type
Generic list
Document library
Links list
Announcements list
Contacts list
Events list
Tasks list
Discussion board
Continue reading
Posted in Misc | Tagged , , | Leave a comment

OOTB Feature and GUID Mapping

When we implement or activate an Out of the box feature in SharePoint 2010 in our code (Visual Studio 2010), it is required, that we add the Feature Id in the Elements.xml file. Following are the mapping of Features and their respective GUID

Feature Name
PublishingPrerequisites Feature
PublishingResources Feature
Navigation Feature
PublishingLayouts Feature
AssetLibrary Feature
EnhancedTheming Feature
EnterpriseWikiLayouts Feature
Ratings Feature
WAReports Feature
 2acf27a5-f703-4277-9f5d-24d70110b18b Continue reading
Posted in Misc | Tagged , | Leave a comment