<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5095462228187295903</id><updated>2024-09-11T07:37:24.852-07:00</updated><title type='text'>jairox&#39;z</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>74</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-1334278986894151234</id><published>2011-10-09T01:43:00.001-07:00</published><updated>2011-10-09T01:43:40.761-07:00</updated><title type='text'>Where is the Surface Area Configuration tool in SQL Server 2008</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;&lt;u&gt;&lt;b&gt;Problem&lt;/b&gt;&lt;/u&gt;I just installed a new instance of SQL Server 2008 and I can&#39;t find the Surface Area Configuration tool that I used to use in SQL Server 2005. How can I manage the Database Engine features in SQL Server 2008?&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;&lt;u&gt;&lt;b&gt;Solution&lt;/b&gt;&lt;/u&gt;Microsoft has removed the Surface Area Configuration tool that was shipped in SQL Server 2005. The Services and Connections that were once managed in Surface Area Configuration tool should now be managed using the SQL Server Configuration Manager. So how do you manage the Database Engine features? You can now manage the Surface Area Configuration for the Database Engine using Policy Based Management. A new Surface Area Configuration Facet in SQL Server Management Studio exposes the properties necessary to make required changes.&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;First, right-click on the instance name that you would like to configure in SQL Server Management Studio and select &quot;Facets&quot; from the context menu as shown below.&lt;/div&gt;&lt;div align=&quot;center&quot; style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.mssqltips.com/tipimages/1673_image2.jpg&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;This will display the View Facets dialog box that will provide you with a drop down of all the available facets that can be configured for the instance.&lt;/div&gt;&lt;div align=&quot;center&quot; style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.mssqltips.com/tipimages/1673_image1.jpg&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;Select &quot;Surface Area Configuration&quot; from the Facet drop down to display the properties exposed by that facet. Make the appropriate changes and select OK to apply them to the server.&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;One interesting feature is the ability to make the appropriate changes for your organization and export them to create a policy using the &quot;Export Current State as Policy...&quot; button. This allows you to configure this once and use this policy throughout your enterprise.&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;&lt;u&gt;&lt;b&gt;Next Steps&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;Although you can use the Surface Area Configuration Facet to manually implement the changes on each individual server, you should review some other articles on Policy Based Management. Once you see the power of using Policy Based Management with a Central Management Server, I think you will be pleasantly surprised by these new changes in SQL Server 2008.&lt;/div&gt;&lt;ul style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;&lt;li&gt;Review tips on Policy Based Management.&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://www.mssqltips.com/sqlservertip/1492/using-policy-based-management-in-sql-server-2008/&quot;&gt;http://www.mssqltips.com/sqlservertip/1492/using-policy-based-management-in-sql-server-2008/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.mssqltips.com/sqlservertip/1493/evaluate-and-implement-policies-in-multiple-sql-server-instances/&quot;&gt;http://www.mssqltips.com/sqlservertip/1493/evaluate-and-implement-policies-in-multiple-sql-server-instances/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Review Policy Based Management in Books Online.&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb510667.aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/bb510667.aspx&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Review using Policy Based Management with Central Management Servers to ease administration across database servers.&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb895144.aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/bb895144.aspx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/1334278986894151234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/1334278986894151234' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/1334278986894151234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/1334278986894151234'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/10/where-is-surface-area-configuration.html' title='Where is the Surface Area Configuration tool in SQL Server 2008'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-4633010221456577581</id><published>2011-10-09T01:41:00.000-07:00</published><updated>2011-10-09T01:41:40.245-07:00</updated><title type='text'>Get list of the stored procedure from database</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;h1 class=&quot;post-title&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #444444; font-family: &#39;Trebuchet MS&#39;, &#39;Myriad Pro&#39;, Tahoma, sans-serif; font-size: 27px; font-weight: normal; line-height: 30px; margin-bottom: 22px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;get list of the stored procedure which contains&amp;nbsp;a&lt;/span&gt;&lt;/h1&gt;&lt;div class=&quot;date&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: Arial, &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; height: 80px; left: -123px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: absolute; text-align: center; top: -7px; vertical-align: baseline; width: 75px;&quot;&gt;&lt;div class=&quot;bg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: url(http://s1.wp.com/wp-content/themes/pub/choco/colors/default/images/date.png); background-origin: initial; background-position: 0px 0px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; height: 62px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 5px; padding-right: 0px; padding-top: 18px; text-shadow: rgb(34, 34, 34) 0px 1px 1px; vertical-align: baseline; width: 70px;&quot;&gt;&lt;span class=&quot;day&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #feefcc; display: block; font-size: 26px; font-weight: bold; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-transform: uppercase; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;31&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #feefcc; display: block; font-size: 16px; font-weight: bold; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-transform: uppercase; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;MAR&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;entry&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: Arial, &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 20px; margin-bottom: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: x-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Get list of the stored procedure which contains a&amp;nbsp;text ‘RAISERROR’&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; border-color: initial; border-style: initial;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: x-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 20px; margin-bottom: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 20px; margin-bottom: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;ROUTINE_NAME&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;ROUTINE_DEFINITION&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;INFORMATION_SCHEMA.ROUTINES&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;WHERE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;ROUTINE_DEFINITION&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;LIKE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;‘%RAISERROR%’&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;AND&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;SPECIFIC_NAME&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;like&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;‘%api%’&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 20px; margin-bottom: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;You can get other important information using Information_schema, run the following query and get the stuff of your interest&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 20px; margin-bottom: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;*&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; font-size: xx-small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;INFORMATION_SCHEMA.ROUTINES&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/4633010221456577581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/4633010221456577581' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/4633010221456577581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/4633010221456577581'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/10/get-list-of-stored-procedure-from.html' title='Get list of the stored procedure from database'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-7221955718839341985</id><published>2011-09-20T03:37:00.000-07:00</published><updated>2011-09-20T03:37:56.461-07:00</updated><title type='text'>A Study of Delegates</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div id=&quot;contentdiv&quot; style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;h2 style=&quot;color: #ff9900; font-size: 13pt;&quot;&gt;Introduction&lt;/h2&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;Many of us already have some idea of delegates. But let&#39;s go deep inside and examine how the CLR/runtime and the compiler interprets the delegates, and what happens when you declare and manipulate delegates.&lt;/div&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;A delegate is a reference type, thus it does not hold the actual value, rather it holds the address of an object residing somewhere in the heap. To make the understanding of delegates simple, compilers represent the delegates in a different way than how it is interpreted by the CLR/runtime. We will first study how the compiler exposes delegates, and then we will jump into some ground realities of delegates from the CLR/runtime perspective.&lt;/div&gt;&lt;h2 style=&quot;color: #ff9900; font-size: 13pt;&quot;&gt;Delegates and .NET Compilers&lt;/h2&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;To make life simpler, most .NET compilers symbolize delegates as pointers to a function, just like the function pointers we have in C++. Thus, in C#, you declare delegates as follows:&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; id=&quot;premain0&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre id=&quot;pre0&quot; lang=&quot;cs&quot; style=&quot;background-color: #fbedbb; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;delegate&lt;/span&gt; &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; MyDelegate (&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; someParam, &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; anotherParam);&lt;/pre&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;From a C# compiler perspective,&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;MyDelagate&lt;/code&gt;&amp;nbsp;is a delegate that could hold the address of a function that has the similar signature.&lt;/div&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;The ability of holding the address of a function makes delegates ideal for:&lt;/div&gt;&lt;ol type=&quot;a&quot;&gt;&lt;li style=&quot;font-size: 10pt;&quot;&gt;Callback functionality&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;Event modeling&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;Having more than one implementation against a method&lt;/li&gt;
&lt;/ol&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;Though the C# compiler exposes delegates as reference types, you could not instantiate the delegate by using the&lt;code lang=&quot;cs&quot; style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&lt;/code&gt;&amp;nbsp;operator; rather delegates could be instantiated by:&lt;/div&gt;&lt;ol type=&quot;a&quot;&gt;&lt;li style=&quot;font-size: 10pt;&quot;&gt;Providing the name of the method to the delegate. These types of delegates are known as &quot;Named Delegates&quot;.&lt;div class=&quot;pre-action-link&quot; id=&quot;premain1&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre id=&quot;pre1&quot; lang=&quot;cs&quot; style=&quot;background-color: #fbedbb; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; DoSomething(&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; someParam, &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; anotherParam)
{
    &lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;Method implementation
&lt;/span&gt;
}

MyDelegate del = DoSomething;
&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;del is a Named Delegate holding 
&lt;/span&gt;
&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;the address of function DoSomething.&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;Providing the implementation of the method to the delegate. These type of delegates are known as &quot;Anonymous Delegates&quot;.&lt;div class=&quot;pre-action-link&quot; id=&quot;premain2&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre id=&quot;pre2&quot; lang=&quot;cs&quot; style=&quot;background-color: #fbedbb; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;del = &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;delegate&lt;/span&gt;(&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; someParam, &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; anotherParam)
      { &lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;Method implementation };&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;Invoking of named or anonymous delegates is same as calling the function:&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; id=&quot;premain3&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre id=&quot;pre3&quot; lang=&quot;cs&quot; style=&quot;background-color: #fbedbb; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;Del (&lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;29&lt;/span&gt;, &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;some value&quot;&lt;/span&gt;);&lt;/pre&gt;&lt;h4 style=&quot;font-size: 10pt;&quot;&gt;Named Delegates&lt;/h4&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;Named delegates could hold the address of instance methods as well as the address of static methods. If the return type of a method is inheriting from the return type defined in the delegate, then the delegate is known as a&lt;strong&gt;Covariance Delegate&lt;/strong&gt;. If the parameters of the methods are the base types of the parameters defined in the delegate, then the delegate is known as a&amp;nbsp;&lt;strong&gt;Contravariance Delegate&lt;/strong&gt;.&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; id=&quot;premain4&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre id=&quot;pre4&quot; lang=&quot;cs&quot; style=&quot;background-color: #fbedbb; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;delegate&lt;/span&gt; ICollection MyDelegate (&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; someParam, 
                                 &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; anotherParam); 

IList DoSomething()
{
    &lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;Method implementation
&lt;/span&gt;
}

MyDelegate del = DoSomething;

&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;As IList is child of ICollection thus, 
&lt;/span&gt;
&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;Del is covariance delegate.
&lt;/span&gt;
&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;delegate&lt;/span&gt; ICollection MyDelegate (IList param);

IList DoSomething(ICollection param)
{
    &lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;Method implementation
&lt;/span&gt;
}

MyDelegate del = DoSomething;

&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;As IList is child of ICollection thus, 
&lt;/span&gt;
&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;Del is contravariance delegate.&lt;/span&gt;&lt;/pre&gt;&lt;h4 style=&quot;font-size: 10pt;&quot;&gt;Anonymous Delegates&lt;/h4&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;If an anonymous delegate is referring to some local variables, then the life of that variable would be extended to the life of that delegate.&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; id=&quot;premain5&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre id=&quot;pre5&quot; lang=&quot;cs&quot; style=&quot;background-color: #fbedbb; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;delegate&lt;/span&gt; &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; MyDelegate (&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; someParam, &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; anotherParam); 

MyDelegate del
&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; DoSomething()
{
    &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; n;
    del = &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;delegate&lt;/span&gt;(&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; someParam, &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; anotherParam)
    { 
        n++;
    }    
}
&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;In above example life of local variable n 
&lt;/span&gt;
&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;would be same as life of anonymous delegate del.&lt;/span&gt;&lt;/pre&gt;&lt;h2 style=&quot;color: #ff9900; font-size: 13pt;&quot;&gt;Delegates and the CLR/Runtime&lt;/h2&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;.NET compilers have made our life easy in handling delegates. In reality, there is neither any concept of pointers to a function nor any significance to the word &quot;delegate&quot; in the CLR/runtime. Rather, the CLR provides an abstract class&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;System.Delegate&lt;/code&gt;&amp;nbsp;that holds the reference of a static method or class instance and the instance method of that class. The&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;System.Delegate&lt;/code&gt;&amp;nbsp;has two properties.&lt;/div&gt;&lt;ul class=&quot;property&quot;&gt;&lt;li style=&quot;font-size: 10pt; list-style-image: url(http://s.codeproject.com/images/symbols/property.GIF);&quot;&gt;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;Target&lt;/code&gt;: Holds the reference of an instance on which the current delegate invokes the instance method. If the method is a static method, this property holds a&amp;nbsp;&lt;code lang=&quot;cs&quot; style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;&lt;/code&gt;&amp;nbsp;value.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt; list-style-image: url(http://s.codeproject.com/images/symbols/property.GIF);&quot;&gt;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;Method&lt;/code&gt;: Holds the instance of the&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;MethodInfo&lt;/code&gt;&amp;nbsp;class for the method represented by the delegate.&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;The delegate also exposes the&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;DynamicInvoke&lt;/code&gt;&amp;nbsp;function to call the method represented by the&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;Method&lt;/code&gt;&amp;nbsp;property. This function takes an array of objects that are the arguments to pass to the target method. If the target method does not take any arguments, the parameter to the&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;DynamicInvoke&lt;/code&gt;&amp;nbsp;function would be&amp;nbsp;&lt;code lang=&quot;cs&quot; style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;&lt;/code&gt;.&lt;/div&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;The CLR also exposes an abstract class&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;System.MultiCastDelegate&lt;/code&gt;&amp;nbsp;that inherits from&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;System.Delegate&lt;/code&gt;.&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;System.MultiCastDelegate&lt;/code&gt;&amp;nbsp;maintains a list, called the Invocation List, of a delegate object. When a multicast delegate is invoked, all the delegates in the invocation list are called synchronously. The&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;System.MultiCastDelegate&lt;/code&gt;&amp;nbsp;exposes the&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;Combine&lt;/code&gt;&amp;nbsp;method to add delegates to the invocation list.&lt;/div&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;When you define a delegate in C#, a new class with the name of the delegate inheriting from&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;System.MultiCastDelegate&lt;/code&gt;&amp;nbsp;is created by the C# compiler.&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; id=&quot;premain6&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre id=&quot;pre6&quot; lang=&quot;cs&quot; style=&quot;background-color: #fbedbb; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;delegate&lt;/span&gt; ICollection MyDelegate (IList param);&lt;/pre&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;The above statement causes a a new class to be added in your assembly by the C# compiler.&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; id=&quot;premain7&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre id=&quot;pre7&quot; lang=&quot;cs&quot; style=&quot;background-color: #fbedbb; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; MyDelegate : System.MultiCastDelegate&lt;/pre&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;You can view this class by opening your assembly using the Ildasm utility.&lt;/div&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;When you assign a method to a delegate, an instance of the compiler generated class is created with the&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;Target&lt;/code&gt;and&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;Method&lt;/code&gt;&amp;nbsp;as parameter to this class. In case the method is&amp;nbsp;&lt;code lang=&quot;cs&quot; style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;static&lt;/span&gt;&lt;/code&gt;,&amp;nbsp;&lt;code lang=&quot;cs&quot; style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;&lt;/code&gt;&amp;nbsp;is passed to the argument,&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;Target&lt;/code&gt;.&lt;/div&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;As compiler generated classes are inheriting from&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;System.MultiCastDelegate&lt;/code&gt;, thus delegate could hold the addresses of more than one method. C# exposes a simple method to add a method in the invocation list of underlying multiCast delegate object.&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; id=&quot;premain8&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;/div&gt;&lt;pre id=&quot;pre8&quot; lang=&quot;cs&quot; style=&quot;background-color: #fbedbb; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;MyDelegate del;
del += DoSomething;
del += DoAnotherThing;&lt;/pre&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;Internally, the C# compiler is calls the&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;Combine&lt;/code&gt;&amp;nbsp;method of the compiler-generated delegate class to add the methods to the invocation list.&lt;/div&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;When you invoke a delegate, C# internally calls the&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;DynamicInvoke&lt;/code&gt;&amp;nbsp;method of the compiler generated class. The compiler generated class also exposes methods to invoke the target methods asynchronously.&lt;/div&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;A delegate is known as an Open Instance Delegate if the&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;Target&lt;/code&gt;&amp;nbsp;is also provided at the time of invocation.&lt;/div&gt;&lt;/div&gt;&lt;h2 style=&quot;background-color: white; color: #ff9900; font-family: Verdana, Arial, sans-serif; font-size: 13pt; text-align: -webkit-auto;&quot;&gt;License&lt;/h2&gt;&lt;div id=&quot;LicenseTerms&quot; style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;This article, along with any associated source code and files, is licensed under&amp;nbsp;&lt;a href=&quot;http://www.codeproject.com/info/cpol10.aspx&quot; rel=&quot;license&quot; style=&quot;color: #004cd5;&quot;&gt;The Code Project Open License (CPOL)&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/7221955718839341985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/7221955718839341985' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/7221955718839341985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/7221955718839341985'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/09/study-of-delegates.html' title='A Study of Delegates'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-1111083608509856271</id><published>2011-09-20T03:32:00.000-07:00</published><updated>2011-09-20T03:32:49.009-07:00</updated><title type='text'>Understanding Covariance and Contravariance in .NET 4.0</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;A couple of years back, while working on a project, we got a compilation exception related to Generics.&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Let A base class&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;BaseVO&lt;/code&gt;&amp;nbsp;and classes deriving from&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;BaseVO&lt;/code&gt;. For example, “FlightVO : BaseVO”.My idealistic assumption was that since:&amp;nbsp;&lt;strong&gt;“FlightVO” inherits from BaseVO&lt;/strong&gt;, and since&amp;nbsp;&lt;strong&gt;BaseVO b = new FlightVO()&lt;/strong&gt;&amp;nbsp;is valid as per inheritance, then:&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;“List&lt;basevo&gt; lstBaseVO = new List&lt;flightvo&gt;() would also be valid.”&lt;/flightvo&gt;&lt;/basevo&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;But duh !!! Instead, I get a compilation exception that says:&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; id=&quot;premain0&quot; style=&quot;background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-family: Verdana, Arial, sans-serif; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre id=&quot;pre0&quot; lang=&quot;text&quot; style=&quot;background-color: white; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: -webkit-auto; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;Argument ’1′: cannot convert from 
  ‘System.Collections.Generic.List&lt;valueobjects.flightvo&gt;’ 
  to ‘System.Collections.Generic.List&lt;valueobjects.basevo&gt;’&lt;/valueobjects.basevo&gt;&lt;/valueobjects.flightvo&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Since I was so sure about my assumption being right, I posted it on the MSDN forum just to confirm that it was a “bug” :-) in Generics. Thread in MSDN forum:&amp;nbsp;&lt;a href=&quot;http://social.msdn.microsoft.com/Forums/bg-BG/netfxbcl/thread/e4863bda-3f24-4a28-af55-230baaff5e7b&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;http://social.msdn.microsoft.com/Forums/bg-BG/netfxbcl/thread/e4863bda-3f24-4a28-af55-230baaff5e7b&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Those were the .NET 3.0 days and one of the MVP moderators gave a pretty good explanation as to why my assumption was wrong. Here’s his explanation:&lt;/div&gt;&lt;blockquote style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;“&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;List&lt;base&gt;&lt;/base&gt;&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;List&lt;derived&gt;&lt;/derived&gt;&lt;/code&gt;&amp;nbsp;are distinct types, you can’t convert&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;List&lt;derived&gt;&lt;/derived&gt;&lt;/code&gt;&amp;nbsp;to&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;List&lt;base&gt;&lt;/base&gt;&lt;/code&gt;. If it were possible, you could pass a&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;List&lt;derived&gt;&lt;/derived&gt;&lt;/code&gt;&amp;nbsp;to a method accepting&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;List&lt;base&gt;&lt;/base&gt;&lt;/code&gt;&amp;nbsp;and that method could add an object of type&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;Base&lt;/code&gt;&amp;nbsp;to the list, which violates the promise that the original list only contains objects of type&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;Derived&lt;/code&gt;”.&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;I assume someone in the CLR team might have found my assumption quite viable and it got shape in .NET 4.0 as&lt;strong&gt;“Covariance and Contravariance in Generics”&lt;/strong&gt;&amp;nbsp;&lt;img alt=&quot;:-)&quot; class=&quot;wp-smiley&quot; src=&quot;http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif&quot; style=&quot;overflow-x: auto; overflow-y: auto;&quot; /&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;strong&gt;So the above case is a valid example where “Covariance in Generics” can be used.&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;However, if we compile&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;List&lt;basevo&gt; lstBaseVO = new List&lt;flightvo&gt;()&lt;/flightvo&gt;&lt;/basevo&gt;&lt;/code&gt;&amp;nbsp;in .NET 4.0, it would still give the same compilation error for the very explanation given by our MVP friend. In order to make it covariant compliant, our modified piece of code would look like:&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; id=&quot;premain1&quot; style=&quot;background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-family: Verdana, Arial, sans-serif; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;img height=&quot;9&quot; id=&quot;preimg1&quot; preid=&quot;1&quot; src=&quot;http://www.codeproject.com/images/minus.gif&quot; style=&quot;cursor: pointer; overflow-x: auto; overflow-y: auto;&quot; width=&quot;9&quot; /&gt;&lt;span id=&quot;precollapse1&quot; preid=&quot;1&quot; style=&quot;cursor: pointer; margin-bottom: 0px;&quot;&gt;&amp;nbsp;Collapse&lt;/span&gt;&amp;nbsp;|&amp;nbsp;&lt;a href=&quot;http://www.codeproject.com/Articles/253417/Understanding-Covariance-and-Contravariance-in-Net#&quot; preid=&quot;1&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;Copy Code&lt;/a&gt;&lt;/div&gt;&lt;pre id=&quot;pre1&quot; lang=&quot;cs&quot; style=&quot;background-color: white; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: -webkit-auto; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;IEnumerable&amp;lt; BaseVO &amp;gt; lstBaseVO = &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; List&amp;lt; FlightVO &amp;gt;();&lt;/pre&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;The above statement is valid because, in .NET 4.0,&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;List&lt;t&gt; : IEnumerable&lt;out t=&quot;&quot;&gt;&lt;/out&gt;&lt;/t&gt;&lt;/code&gt;&amp;nbsp;&lt;strong&gt;where type ‘T’ is marked as covariant.&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Here’s a quick summarization about variance in Generics.&lt;/div&gt;&lt;ol style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;li style=&quot;font-size: 10pt;&quot;&gt;What are the programming constructs where covariance and contravariance are applicable? Variant type parameters are restricted to generic interfaces and generic delegate types thereby ensuring type safety.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;In what scenarios would we want to use variance in Generics? Let&#39;s look at a code snippet.&lt;/li&gt;
&lt;/ol&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;a href=&quot;http://geekgiri.files.wordpress.com/2011/09/covariance-example.jpg&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;&lt;img alt=&quot;covariance example&quot; border=&quot;0&quot; height=&quot;543&quot; src=&quot;http://geekgiri.files.wordpress.com/2011/09/covariance-example_thumb.jpg?w=467&amp;amp;h=543&quot; style=&quot;overflow-x: auto; overflow-y: auto;&quot; title=&quot;covariance example&quot; width=&quot;467&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;strong&gt;So, covariance and contravariance of generic type parameters enable us to use constructed generic types [A&lt;athlete&gt;] whose type arguments [Athlete] are more derived (covariance) or less derived (contravariance) than the type argument [Person] of a target constructed type [ISample&lt;person&gt;].&lt;/person&gt;&lt;/athlete&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Covariance seems very natural because it behaves like polymorphism, whereas Contravariance seems counterintuitive. One thing that we need to be clear about is that both Covariance and Contravariance both adhere to the thumb rule of&amp;nbsp;&lt;strong&gt;“Inheritance”&amp;nbsp;&lt;/strong&gt;which says,&lt;/div&gt;&lt;blockquote style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;“A derived class instance can be assigned to a base class variable”&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Now, let’s look at a Contravariance example.&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;a href=&quot;http://geekgiri.files.wordpress.com/2011/09/contravariiance1.jpg&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;&lt;img alt=&quot;contravariiance1&quot; border=&quot;0&quot; height=&quot;123&quot; src=&quot;http://geekgiri.files.wordpress.com/2011/09/contravariiance1_thumb.jpg?w=614&amp;amp;h=123&quot; style=&quot;overflow-x: auto; overflow-y: auto;&quot; title=&quot;contravariiance1&quot; width=&quot;614&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Line 2 of code snippet might make you feel that the thumb rule of inheritance is being violated. I.e., the derived class variable&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;d&lt;/code&gt;&amp;nbsp;is being assigned an instance of the&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;Base&lt;/code&gt;&amp;nbsp;class.&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;However, that isn’t the case. Let’s understand each line of the code snippet.&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;a href=&quot;http://geekgiri.files.wordpress.com/2011/09/contravariiance2.jpg&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;&lt;img alt=&quot;contravariiance2&quot; border=&quot;0&quot; height=&quot;189&quot; src=&quot;http://geekgiri.files.wordpress.com/2011/09/contravariiance2_thumb.jpg?w=610&amp;amp;h=189&quot; style=&quot;overflow-x: auto; overflow-y: auto;&quot; title=&quot;contravariiance2&quot; width=&quot;610&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;a href=&quot;http://geekgiri.files.wordpress.com/2011/09/contravariiance4.jpg&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;&lt;img alt=&quot;contravariiance4&quot; border=&quot;0&quot; height=&quot;119&quot; src=&quot;http://geekgiri.files.wordpress.com/2011/09/contravariiance4_thumb.jpg?w=614&amp;amp;h=119&quot; style=&quot;overflow-x: auto; overflow-y: auto;&quot; title=&quot;contravariiance4&quot; width=&quot;614&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;a href=&quot;http://geekgiri.files.wordpress.com/2011/09/contravariiance3.jpg&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;&lt;img alt=&quot;contravariiance3&quot; border=&quot;0&quot; height=&quot;134&quot; src=&quot;http://geekgiri.files.wordpress.com/2011/09/contravariiance3_thumb.jpg?w=610&amp;amp;h=134&quot; style=&quot;overflow-x: auto; overflow-y: auto;&quot; title=&quot;contravariiance3&quot; width=&quot;610&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;strong&gt;In general, a covariant type parameter can be used as the return type of a generic delegate/interface, and contravariant type parameters can be used as input parameter types.&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;A brief summary of facts about variance in the common language runtime:&lt;/div&gt;&lt;ol style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;li style=&quot;font-size: 10pt;&quot;&gt;A generic interface or generic delegate type can have both covariant and contravariant type parameters.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;Variance applies only to reference types; if you specify a value type for a variant type parameter, that type parameter is invariant for the resulting constructed type.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;How do we define variant generic interfaces and delegates?&lt;/li&gt;
&lt;/ol&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Starting with the .NET Framework 4, Visual Basic and C# have keywords that enable you to mark the generic type parameters of interfaces and delegates as covariant or contravariant.&lt;/div&gt;&lt;ul style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;li style=&quot;font-size: 10pt;&quot;&gt;A covariant type parameter is marked with the&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;out&lt;/code&gt;&amp;nbsp;keyword. You cannot use a covariant type parameter as a generic type constraint for interface methods. E.g.,&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;T Display&lt;out t=&quot;&quot;&gt;();&lt;/out&gt;&lt;/code&gt;&amp;nbsp;is an invalid statement.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;A contravariant type parameter is marked with the&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;in&lt;/code&gt;&amp;nbsp;keyword. You can use a contravariant type parameter as a generic type constraint for an interface method.&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Thank you.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/1111083608509856271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/1111083608509856271' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/1111083608509856271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/1111083608509856271'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/09/understanding-covariance-and.html' title='Understanding Covariance and Contravariance in .NET 4.0'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-2758337596750931310</id><published>2011-09-20T03:06:00.001-07:00</published><updated>2011-09-20T03:06:41.247-07:00</updated><title type='text'>Your Azure Web Role and Full IIS – Culture Changes</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div id=&quot;contentdiv&quot; style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;On Azure SDK v1.3 onwards, your web role can enjoy the benefits full IIS capabilities. It means that your application has now fully controlled by IIS 7.x. Prior to v1.3, your web role was hosted on “Hosted Web Core” (HWC – hmmm, another acronym), a feature introduced in IIS 7.0. HWC can be seen as a raw IIS without having IIS monitoring and administrative features. Hence, you can have your own IIS for a specific web application. It runs in a different process (&lt;em&gt;WaWebHost.exe&lt;/em&gt;) and has a dedicated single application pool. So, the mental model of your web role application would be:&lt;/div&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;&lt;a href=&quot;http://udooz.net/blog/wp-content/uploads/2011/08/full_iis_1.png&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;&lt;img alt=&quot;WaWebHost&quot; border=&quot;0&quot; class=&quot;alignnone size-full wp-image-291&quot; complete=&quot;true&quot; height=&quot;217&quot; hspace=&quot;0&quot; src=&quot;http://udooz.net/blog/wp-content/uploads/2011/08/full_iis_1.png&quot; style=&quot;height: 217px; overflow-x: auto; overflow-y: auto; width: 298px;&quot; title=&quot;Figure 1&quot; width=&quot;298&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;An Azure web role consists of two logical parts in the assembly, one is&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;RoleEntryPoint&amp;nbsp;&lt;/code&gt;implementation and another one is your actual web application. Your typical Azure web role has:&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;font-size: 10pt;&quot;&gt;Web role lifecycle code (&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;RoleEntry&amp;nbsp;&lt;/code&gt;–&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;OnStart&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;OnRun&amp;nbsp;&lt;/code&gt;and&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;OnStop&lt;/code&gt;) and Service model (csdef and cscfg)&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;Web application code and web configuration (&lt;em&gt;web.config&lt;/em&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;In HWC, both Web role and web application logical artifacts are resided in a single process (&lt;em&gt;WaWebHost.exe&lt;/em&gt;) as shown in figure 1. In the new full IIS capability feature, web role artifacts are loaded into a process called&lt;em&gt;WaIISHost.exe&lt;/em&gt;. The web application code as usual is in&amp;nbsp;&lt;em&gt;w3wp.exe&lt;/em&gt;. This is shown in figure 2.&lt;/div&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;&lt;a href=&quot;http://udooz.net/blog/wp-content/uploads/2011/08/full_iis_21.png&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;&lt;img alt=&quot;WaIISHost&quot; border=&quot;0&quot; class=&quot;alignnone size-full wp-image-293&quot; complete=&quot;true&quot; height=&quot;214&quot; hspace=&quot;0&quot; src=&quot;http://udooz.net/blog/wp-content/uploads/2011/08/full_iis_21.png&quot; style=&quot;height: 214px; overflow-x: auto; overflow-y: auto; width: 547px;&quot; title=&quot;Figure 2&quot; width=&quot;547&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;This creates some culture changes in the approach we previously did. I have experimented only on DevFabric and am yet to test on Azure. Probably, I’ll update later. The changes are:&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;font-size: 10pt;&quot;&gt;&lt;strong&gt;Process with different accounts&lt;/strong&gt;.&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;WaIISHost&amp;nbsp;&lt;/code&gt;and&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;w3wp&amp;nbsp;&lt;/code&gt;are now running in two different account privileges. Generally,&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;WaIISHost&amp;nbsp;&lt;/code&gt;runs in higher privilege and this would cause some code in your web application which was previously enjoyed this high privilege benefit. For example, you can create or access an machine level environment variable from your web application in HWC mode. In Full IIS, this makes exception.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;&lt;strong&gt;Global Configuration Setting Publisher&lt;/strong&gt;. In HWC, it is enough to initialize global configuration setting publisher once in&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;RoleEntryPoint.OnStart()&lt;/code&gt;. However, now in two different processes, you have to again set the publisher either in your framework start up or&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;Application_Start()&lt;/code&gt;, otherwise it throws an exception with message “&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;SetConfigurationSettingPublisher&amp;nbsp;&lt;/code&gt;needs to be called before&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;FromConfigurationSetting&amp;nbsp;&lt;/code&gt;can be used”. Instead of being held up with two different initializations,&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;CloudStorageAccount.Parse()&amp;nbsp;&lt;/code&gt;is quite simple and elegant. It just want the connection string detail as a string which can be provided by&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;RoleEnvironment.GetConfigurationSettingValue(…)&lt;/code&gt;. This is safer too.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;&lt;strong&gt;Application_End will not be encountered&lt;/strong&gt;. In full IIS,&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;Application_End()&amp;nbsp;&lt;/code&gt;will never be called when you stop the debugging like you normally did in HWC.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;&lt;strong&gt;Static variables in RoleEntryPoint are not accessible from your web application&lt;/strong&gt;. Since these two applications are running in two different processes, sharing objects through&amp;nbsp;&lt;code style=&quot;color: #990000; font: normal normal normal 11pt/normal &#39;Courier New&#39;, Courier, mono;&quot;&gt;static&amp;nbsp;&lt;/code&gt;variable is not possible in Full IIS. Instead, try to use machine level environment variable or local resource.&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 style=&quot;background-color: white; color: #ff9900; font-family: Verdana, Arial, sans-serif; font-size: 13pt; text-align: -webkit-auto;&quot;&gt;License&lt;/h2&gt;&lt;div id=&quot;LicenseTerms&quot; style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;This article, along with any associated source code and files, is licensed under&amp;nbsp;&lt;a href=&quot;http://creativecommons.org/licenses/by-sa/2.5/&quot; rel=&quot;license&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;The Creative Commons Attribution-ShareAlike 2.5 License&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/2758337596750931310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/2758337596750931310' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/2758337596750931310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/2758337596750931310'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/09/your-azure-web-role-and-full-iis.html' title='Your Azure Web Role and Full IIS – Culture Changes'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-9091703050254350578</id><published>2011-09-20T02:57:00.001-07:00</published><updated>2011-09-20T02:58:26.838-07:00</updated><title type='text'>C# &amp; SQLite – System.Data.SQLite</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;Building an VS2010 project using an SQLite embedded database.. Project codename &amp;amp;quotContact&amp;amp;qout; I’ll be demostrating how to insert, edit and delete records from the database First of all you’ll have to aquire a few files and install a few necessary&amp;nbsp;software packets. SQLite ADO.Net pro&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;header-sidebar&quot; id=&quot;ctl00_HeadSide&quot; style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; padding-bottom: 0px; padding-left: 10px; padding-right: 7px; padding-top: 7px; position: absolute; right: 0px; top: 0px; width: 210px;&quot;&gt;&lt;/div&gt;&lt;ul style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;li style=&quot;font-size: 10pt;&quot;&gt;Building an VS2010 project using an SQLite embedded database&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;Project codename &amp;amp;quotContact&amp;amp;qout;&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;I’ll be demostrating how to insert, edit and delete records from the database&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;First of all you’ll have to aquire a few files and install a few necessary software packets.&lt;/div&gt;&lt;ul style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;li style=&quot;font-size: 10pt;&quot;&gt;SQLite ADO.Net provider&amp;nbsp;&lt;a href=&quot;http://sqlite.phxsoftware.com/&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;http://sqlite.phxsoftware.com&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;SQLite Administrator&amp;nbsp;&lt;a href=&quot;http://sqliteadmin.orbmu2k.de/&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;http://sqliteadmin.orbmu2k.de&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h3 style=&quot;background-color: white; color: #ff9900; font-family: Verdana, Arial, sans-serif; font-size: 11pt; text-align: -webkit-auto;&quot;&gt;SQLite Admin Tool&lt;/h3&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;This tool I chose the Full install and I’m pleased with the result.&lt;/div&gt;&lt;h3 style=&quot;background-color: white; color: #ff9900; font-family: Verdana, Arial, sans-serif; font-size: 11pt; text-align: -webkit-auto;&quot;&gt;SQLite ADO.Net Provider&lt;/h3&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;This tool I installed in a&amp;nbsp;&lt;em&gt;C:\Temp&lt;/em&gt;&amp;nbsp;file and I choze not to register the DLL files. Why because I just needed to include the main DLL in my project.&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;First we create a SQLite dB named &quot;Contact.3db&quot; using the SQLite Admin tool. I added a table &quot;Contact&quot; with a few fields and inserted a few records of data to play with.&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; id=&quot;premain0&quot; style=&quot;background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-family: Verdana, Arial, sans-serif; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre id=&quot;pre0&quot; style=&quot;background-color: white; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: -webkit-auto; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;CREATE TABLE [Contact] (
[contact_id] INTEGER  PRIMARY KEY AUTOINCREMENT NOT NULL,
[FirstName] vARCHAR(&lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;50&lt;/span&gt;)  NULL,
[LastName] vARCHAR(&lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;50&lt;/span&gt;)  NULL)&lt;/pre&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Next I created a VS2010 project named &quot;Contact&quot; and added a few folders and files&lt;/div&gt;&lt;ul style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;li style=&quot;font-size: 10pt;&quot;&gt;Add a folder[Database] and insert an existing Item &quot;Contact.3db&quot;&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;Change the property &amp;nbsp;&quot;Copy to Output Directory&quot; -&amp;gt; &quot;Copy Always&quot;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Next I added the ecential SQLite DLL to my project.&lt;br /&gt;
&lt;em&gt;System.Data.SQLite.dll&lt;/em&gt;&amp;nbsp;-&amp;gt; change the property&amp;nbsp;&quot;Copy to Output Directory&quot; -&amp;gt; &quot;Copy Always&quot;&lt;br /&gt;
&lt;em&gt;SQLite.Interop.dll&lt;/em&gt;&amp;nbsp;-&amp;gt; change the property&amp;nbsp;&quot;Copy to Output Directory&quot; -&amp;gt; &quot;Copy Always&quot;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Remark: Both files [&amp;nbsp;&lt;em&gt;System.Data.SQLite.dll&lt;/em&gt;&amp;nbsp;,&amp;nbsp;&lt;em&gt;SQLite.Interop.dll&lt;/em&gt;&amp;nbsp;] must be included just under the root project &quot;Contact&quot;.&lt;br /&gt;
Contact&lt;br /&gt;
-&amp;gt; &amp;nbsp;&lt;em&gt;System.Data.SQLite.dll&lt;/em&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&amp;nbsp;&lt;em&gt;SQLite.Interop.dll&lt;/em&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Next I added a Folder named &quot;Classes&quot; and created to classes to handel all dB transactions..&lt;br /&gt;
&lt;em&gt;dBFunctions.cs&lt;/em&gt;&amp;nbsp;and&amp;nbsp;&lt;em&gt;dBHelper.cs&lt;/em&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Next I added a Folder named &quot;Forms&quot; and created a few forms to handel Interaction / Interface&lt;br /&gt;
&lt;em&gt;ContactList.cs&lt;/em&gt;&amp;nbsp;,&amp;nbsp;&lt;em&gt;BaseContact.cs&lt;/em&gt;&amp;nbsp;,&amp;nbsp;&lt;em&gt;NewContact.cs&lt;/em&gt;&amp;nbsp;,&amp;nbsp;&amp;nbsp;&lt;em&gt;EditContact.cs&lt;/em&gt;&amp;nbsp;,&amp;nbsp;&lt;em&gt;DeleteContact.cs&lt;/em&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;And this includes my files within my project.&lt;br /&gt;
&lt;br /&gt;
You can download the source code&amp;nbsp;&lt;a href=&quot;http://blog.kribo.be/blog/wp-content/uploads/2011/05/Contact.zip&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;here&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/9091703050254350578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/9091703050254350578' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/9091703050254350578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/9091703050254350578'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/09/c-sqlite-systemdatasqlite.html' title='C# &amp; SQLite – System.Data.SQLite'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-916815912914943537</id><published>2011-09-20T00:05:00.001-07:00</published><updated>2011-09-20T00:05:43.728-07:00</updated><title type='text'>How to clear a TextBox value in a single click in C# .NET</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;pre id=&quot;pre0&quot; lang=&quot;cs&quot; style=&quot;background-color: white; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: -webkit-auto; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Button2_Click(&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;object&lt;/span&gt; sender, EventArgs e)
{
    ClearInputs(Page.Controls);
}
&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; ClearInputs(ControlCollection ctrls)
{
    &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;foreach&lt;/span&gt; (Control ctrl &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; ctrls)
    {
        &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (ctrl &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;is&lt;/span&gt; TextBox)
            ((TextBox)ctrl).Text = &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;.Empty;
        ClearInputs(ctrl.Controls);
    }
}&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/916815912914943537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/916815912914943537' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/916815912914943537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/916815912914943537'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/09/how-to-clear-textbox-value-in-single.html' title='How to clear a TextBox value in a single click in C# .NET'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-3812544703571737261</id><published>2011-09-16T00:47:00.000-07:00</published><updated>2011-09-16T00:47:38.687-07:00</updated><title type='text'>Sending HTML e-mail with embedded images</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;content&quot;&gt;&lt;div id=&quot;AdnTop&quot;&gt;&lt;div class=&quot;AdnTopLeft&quot; style=&quot;float: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;AdnTopRight&quot; style=&quot;float: right;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;clear: both;&quot;&gt;&lt;/div&gt;&lt;/div&gt;I&#39;ve seen a couple posts on this before but they all seem to miss out a critical piece of code that without, causes the images to be embedded but they do not display correctly in some e-mail clients (such as Outlook 2003/2007). The following code will make it work across a number of clients I&#39;ve tested it with and I&#39;ve also thrown in a basic way to have a plain text e-mail attached as well in case the client does not support HTML.   &lt;br /&gt;
&lt;br /&gt;
Disclaimer: I&#39;ve chosen to use the media type of &lt;i&gt;JPEG&lt;/i&gt;, it&#39;s not ideal but it&#39;s something I threw together to get the main point across. You should really get the file extension and use a switch statement for the different media types.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;csharpcode&quot; style=&quot;background-color: #fff2cc;&quot;&gt;&lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; SendMessageWithEmbeddedImages()
{
  &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; htmlMessage = &lt;span class=&quot;str&quot;&gt;@&quot;&amp;lt;html&amp;gt;

                         &amp;lt;body&amp;gt;
                         &amp;lt;img src=&#39;cid:EmbeddedContent_1&#39; /&amp;gt;
                         &amp;lt;/body&amp;gt;
                         &amp;lt;/html&amp;gt;&quot;&lt;/span&gt;;
  SmtpClient client = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; SmtpClient(&lt;span class=&quot;str&quot;&gt;&quot;mail.server.com&quot;&lt;/span&gt;);
  MailMessage msg = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; MailMessage(&lt;span class=&quot;str&quot;&gt;&quot;noreply@deventerprise.net&quot;&lt;/span&gt;,
                                    &lt;span class=&quot;str&quot;&gt;&quot;someone@deventerprise.net&quot;&lt;/span&gt;);
  &lt;span class=&quot;rem&quot;&gt;// Create the HTML view&lt;/span&gt;

  AlternateView htmlView = AlternateView.CreateAlternateViewFromString(
                                               htmlMessage,
                                               Encoding.UTF8,
                                               MediaTypeNames.Text.Html);
  &lt;span class=&quot;rem&quot;&gt;// Create a plain text message for client that don&#39;t support HTML&lt;/span&gt;
  AlternateView plainView = AlternateView.CreateAlternateViewFromString(
                                              Regex.Replace(htmlMessage,
                                                            &lt;span class=&quot;str&quot;&gt;&quot;&amp;lt;[^&amp;gt;]+?&amp;gt;&quot;&lt;/span&gt;,
                                                            &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt;.Empty),
                                              Encoding.UTF8,
                                              MediaTypeNames.Text.Plain);
  &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; mediaType = MediaTypeNames.Image.Jpeg;
  LinkedResource img = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; LinkedResource(&lt;span class=&quot;str&quot;&gt;@&quot;C:\Images\MyImage.jpg&quot;&lt;/span&gt;, mediaType);
  &lt;span class=&quot;rem&quot;&gt;// Make sure you set all these values!!!&lt;/span&gt;

  img.ContentId = &lt;span class=&quot;str&quot;&gt;&quot;EmbeddedContent_1&quot;&lt;/span&gt;;
  img.ContentType.MediaType = mediaType;
  img.TransferEncoding = TransferEncoding.Base64;
  img.ContentType.Name = img.ContentId;
  img.ContentLink = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Uri(&lt;span class=&quot;str&quot;&gt;&quot;cid:&quot;&lt;/span&gt; + img.ContentId);
  htmlView.LinkedResources.Add(img);
  &lt;span class=&quot;rem&quot;&gt;//////////////////////////////////////////////////////////////&lt;/span&gt;
  msg.AlternateViews.Add(plainView);
  msg.AlternateViews.Add(htmlView);
  msg.IsBodyHtml = &lt;span class=&quot;kwrd&quot;&gt;true&lt;/span&gt;;
  msg.Subject = &lt;span class=&quot;str&quot;&gt;&quot;Some subject&quot;&lt;/span&gt;;
  client.Send(msg);
}&lt;/pre&gt;&lt;br /&gt;
I couldn&#39;t find this information anywhere but I tried setting a whole bunch of things until the images displayed correctly, hope this helps someone with the same issues. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;under&quot;&gt;Expect to see this feature in my &lt;a href=&quot;http://www.deventerprise.net/Projects.aspx#emailer&quot;&gt;Command Line E-mailer&lt;/a&gt; application so that sending HTML e-mails appear the way you designed them locally when they arrive at the recipient.&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;fixed&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/3812544703571737261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/3812544703571737261' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/3812544703571737261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/3812544703571737261'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/09/sending-html-e-mail-with-embedded.html' title='Sending HTML e-mail with embedded images'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-4987358147961885735</id><published>2011-09-16T00:31:00.000-07:00</published><updated>2011-09-16T00:31:06.555-07:00</updated><title type='text'>Android applications in C# using Visual Studio</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;h3&gt;Getting Started&lt;/h3&gt;To get everything installed read &lt;a href=&quot;http://monodroid.net/Installation&quot; target=&quot;_blank&quot;&gt;this guide&lt;/a&gt;. Then you can read about the API and architecture to get a better understanding about how it all gels together. Pretty much everything you need including signing up for the newsletter can be found by going directly to &lt;a href=&quot;http://www.monodroid.net/&quot; target=&quot;_blank&quot;&gt;www.monodroid.net&lt;/a&gt;.&lt;br /&gt;
Once you have everything installed it’s pretty easy to get going. The beauty about diving in using a language you are familiar with, means you can get used to the &lt;a href=&quot;http://developer.android.com/sdk/index.html&quot; target=&quot;_blank&quot;&gt;Android SDK&lt;/a&gt; without having any knowledge of Java or even C++ (for more advanced features). &lt;a href=&quot;http://monodroid.net/&quot; target=&quot;_blank&quot;&gt;MonoDroid&lt;/a&gt; wraps up all the calls using standard .NET constructs through a JNI bridge, plus, you get all of the power of the standard .NET API’s which work in Linux/Android.&lt;br /&gt;
&lt;h3&gt;Hello Android&lt;/h3&gt;Following the tradition of “Hello World”, let’s jump right in and write an &lt;a href=&quot;http://en.wikipedia.org/wiki/Android_%28operating_system%29&quot; target=&quot;_blank&quot;&gt;Android&lt;/a&gt; application.&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Make sure that you have everything installed, &lt;a href=&quot;http://monodroid.net/Installation&quot; target=&quot;_blank&quot;&gt;this guide&lt;/a&gt; couldn’t have made it easier.       &lt;br clear=&quot;all&quot; /&gt;      &lt;/li&gt;
&lt;li&gt;Create a new Project in Visual Studio: &lt;a href=&quot;http://www.brutaldev.com/image.axd?picture=MonoDroid_VisualStudioNewProject_1.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;New MonoDroid project in Visual Studio 2010&quot; border=&quot;0&quot; height=&quot;273&quot; src=&quot;http://www.brutaldev.com/image.axd?picture=MonoDroid_VisualStudioNewProject_thumb_1.jpg&quot; style=&quot;background-image: none; border: 0px none; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;New MonoDroid project in Visual Studio 2010&quot; width=&quot;554&quot; /&gt;&lt;/a&gt;       &lt;br clear=&quot;all&quot; /&gt;      &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://monodroid.net/&quot; target=&quot;_blank&quot;&gt;MonoDroid&lt;/a&gt; does most of the heavy lifting for you. If you’re familiar with &lt;a href=&quot;http://en.wikipedia.org/wiki/Android_%28operating_system%29&quot; target=&quot;_blank&quot;&gt;Android&lt;/a&gt; projects in &lt;a href=&quot;http://www.eclipse.org/downloads/&quot; target=&quot;_blank&quot;&gt;Eclipse&lt;/a&gt; you should have any problems with the structure. Android uses layout and string resource files (the right way) for the UI. Activities are like UI controllers, all the info you need is on the &lt;a href=&quot;http://developer.android.com/index.html&quot; target=&quot;_blank&quot;&gt;Android Developers website&lt;/a&gt;.       &lt;br clear=&quot;all&quot; /&gt;      &lt;/li&gt;
&lt;li&gt;Just run the application to check everything is working correctly, if you don’t have a device attached or an emulator running then now is the time to create one: &lt;a href=&quot;http://www.brutaldev.com/image.axd?picture=MonoDroid_SelectDevice.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Select a device to connect the debugger&quot; border=&quot;0&quot; height=&quot;308&quot; src=&quot;http://www.brutaldev.com/image.axd?picture=MonoDroid_SelectDevice_thumb.jpg&quot; style=&quot;background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Select a device to connect the debugger&quot; width=&quot;468&quot; /&gt;&lt;/a&gt;&amp;nbsp; &lt;br clear=&quot;all&quot; /&gt;      &lt;br clear=&quot;all&quot; /&gt;If you don’t see anything then just click “Start emulator image”: &lt;a href=&quot;http://www.brutaldev.com/image.axd?picture=MonoDroid_SelectEmulator.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Select an emulator to start or create a new one&quot; border=&quot;0&quot; height=&quot;309&quot; src=&quot;http://www.brutaldev.com/image.axd?picture=MonoDroid_SelectEmulator_thumb.jpg&quot; style=&quot;background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Select an emulator to start or create a new one&quot; width=&quot;467&quot; /&gt;&lt;/a&gt;       &lt;br clear=&quot;all&quot; /&gt;Once again &lt;a href=&quot;http://monodroid.net/&quot; target=&quot;_blank&quot;&gt;MonoDroid&lt;/a&gt; holds your hand by signing the package and also installing the Mono runtime if it’s not already available.       &lt;br clear=&quot;all&quot; /&gt;&lt;strong&gt;WARNING&lt;/strong&gt;: If you are running an emulator then this will take a while, if you have a monster PC that does it in seconds then I hate you. &lt;br clear=&quot;all&quot; /&gt;      &lt;/li&gt;
&lt;li&gt;Unlock the phone/emulator and click the button: &lt;a href=&quot;http://www.brutaldev.com/image.axd?picture=MonoDroid_HelloWorlApplication_1.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;The default Hello World application&quot; border=&quot;0&quot; height=&quot;392&quot; src=&quot;http://www.brutaldev.com/image.axd?picture=MonoDroid_HelloWorlApplication_thumb_1.jpg&quot; style=&quot;background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;The default Hello World application&quot; width=&quot;554&quot; /&gt;&lt;/a&gt;&amp;nbsp; &lt;br clear=&quot;all&quot; /&gt;That’s it! There is a lot of documentation on writing Android applications. Java isn&#39;t that far off in syntax to C# so it will be easy to pick up sample code all over the place. &lt;/li&gt;
&lt;/ol&gt;&lt;br clear=&quot;all&quot; /&gt;  &lt;div class=&quot;wlWriterEditableSmartContent&quot; id=&quot;scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:6db782a1-3d96-4e79-a15c-48ea6a5fb6d2&quot; style=&quot;display: inline; float: none; margin: 0px; padding: 0px;&quot;&gt;&lt;div&gt;&lt;a href=&quot;http://www.brutaldev.com/file.axd?file=BrutalMonoDroidApplication.zip&quot; onclick=&quot;javascript: _gaq.push([&#39;_trackPageview&#39;, &#39;BrutalMonoDroidApplication.zip&#39;]);&quot; target=&quot;_self&quot;&gt;Download sample code&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br clear=&quot;all&quot; /&gt;  &lt;h3&gt;More Information&lt;/h3&gt;The best place to start is the &lt;a href=&quot;http://monodroid.net/Documentation/API_Design&quot; target=&quot;_blank&quot;&gt;MonoDroid API design documentation&lt;/a&gt;. Do yourself a favour and browse the classes in the Android namespace. Make sure you check &lt;em&gt;Android.Provider&lt;/em&gt; which gives you access to things like Contacts, Settings, Calls Logs etc. through static classes.&lt;br /&gt;
This Justin guy slicked the domain &lt;a href=&quot;http://www.mono-droid.com/&quot; target=&quot;_blank&quot;&gt;www.mono-droid.com&lt;/a&gt; in July 2010 already so this isn’t new, just widely available now and free for the time being. There is a lot of useful information on installing and developing here. He’s got videos too, everyone loves videos.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/4987358147961885735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/4987358147961885735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/4987358147961885735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/4987358147961885735'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/09/android-applications-in-c-using-visual.html' title='Android applications in C# using Visual Studio'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-4179366776492525203</id><published>2011-09-15T07:15:00.000-07:00</published><updated>2011-09-15T07:15:00.301-07:00</updated><title type='text'>Interview Questions and Answer on .Net,C#,ASP.NET,SQL Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;h1 style=&quot;color: #c83b00; font-size: 16px; margin-left: 3px;&quot;&gt;&lt;a href=&quot;http://www.questpond.com/&quot; style=&quot;text-decoration: none;&quot;&gt;Interview Questions and Answer on .Net,C#,ASP.NET,SQL Server&lt;/a&gt;&lt;/h1&gt;&lt;ul style=&quot;font-size: 12px; line-height: 25px; margin-left: 10px; padding-left: 15px; width: 650px;&quot;&gt;&lt;li&gt; All &lt;a href=&quot;http://www.questpond.com/&quot; style=&quot;text-decoration: none;&quot;&gt;.NET training videos&lt;/a&gt; and explanation are not just theory and one liners. They are in depth videos with source code and explanation and finally taking out the actual meat which you need to speak before the interviewer to impress him.&lt;/li&gt;
&lt;li&gt; We do not just provide videos and leave the developers on their own.Online support via live meeting from Microsoft MVP&#39;s takes this product to a greater height.&lt;/li&gt;
&lt;li&gt; We understand no one can see 500 videos at one go. We organize regularC# training on various topics so that your learning curve is reduced to a great extent.&lt;/li&gt;
&lt;li&gt; Around 500 videos covering right from .NET, &lt;a href=&quot;http://www.questpond.com/c-sharp-interview-questions-answers.html&quot; style=&quot;text-decoration: none;&quot;&gt;CSharp Interview Questions and Answers&lt;/a&gt;. You are either a fresher /senior architect /project manager this solution is for every level.&lt;/li&gt;
&lt;li&gt; Full DVD delivered to your doorsteps( only for USA , India and Canada).&lt;/li&gt;
&lt;li&gt; Mock interviews, Mock interviews , Mock interviews and Mock interviews makes this solution and perfect package for your job search. These mock interviews are conducted by our specialist to evaluate how much you are prepared and ready.&lt;/li&gt;
&lt;li&gt; Superb one liner interview answer cheat sheet to make you revise in a day.&lt;/li&gt;
&lt;li&gt; Videos are not  just theory and talks , its Step by Step demonstration with actual code and fundamentals.&lt;/li&gt;
&lt;li&gt; Money back if you are not satisfied with our videos and support. &lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: 18px; line-height: 25px; padding: 10px;&quot;&gt; &lt;b style=&quot;color: #c83b00;&quot;&gt;&lt;u&gt;Summary of Topics Covered in &lt;a href=&quot;http://www.questpond.com/&quot; style=&quot;text-decoration: none;&quot;&gt;.Net Training&lt;/a&gt;&lt;/u&gt;&lt;/b&gt; &lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 25px; padding: 4px;&quot;&gt; We understand that working on a project is one thing but clearing interviews needs a change of mind set and this solution is especially meant for the same. From the same aspect we have divided our interview videos are divided in 5 essential categories :- &lt;/div&gt;&lt;ul style=&quot;font-size: 12px; font-weight: bold; line-height: 25px; margin-left: 15px; padding-left: 15px; width: 650px;&quot;&gt;&lt;li&gt; Basic .NET, ASP.NET, OOPS and SQL Server. &lt;a href=&quot;http://www.questpond.com/&quot; style=&quot;text-decoration: none;&quot;&gt;Interview questions and answers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; New technologies WCF, WPF, Silverlight , LINQ, Azure, EF and  4.0. Interview questions and answers&lt;/li&gt;
&lt;li&gt; Design pattern, UML, Architecture, Estimation, Project management, VSTS. Interview questions and answers&lt;/li&gt;
&lt;li&gt; Complete Invoicing project end to end. Interview questions and answers&lt;/li&gt;
&lt;li&gt; Server products (Sharepoint 2007 questions and answer videos). Interview questions and answers&lt;/li&gt;
&lt;li&gt; Best practices and SQL performance tuning. Interview questions and answers&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: 18px; line-height: 25px; padding: 10px;&quot;&gt; &lt;b style=&quot;color: #c83b00;&quot;&gt;&lt;u&gt;Details of the above .Net Training  Topics&lt;/u&gt;&lt;/b&gt; &lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 25px; padding: 10px;&quot;&gt; Below is our detail video list of the above main .Net Training topics. All .net training videos go in-depth with source code and then explaining you the one liner which you need to speak in the interview.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Basic .NET, ASP.NET, OOPS and SQL Server Interview questions and answers.&lt;/b&gt; &lt;/div&gt;&lt;ul style=&quot;font-size: 12px; font-weight: normal; line-height: 25px; margin-left: 15px; padding-left: 15px; width: 650px;&quot;&gt;&lt;li&gt; What is IL code, CLR, CTS, GAC &amp;amp; GC?&lt;/li&gt;
&lt;li&gt; How can we do Assembly versioning?&lt;/li&gt;
&lt;li&gt;can you explain how ASP.NET application life cycle and page life cycle events fire?&lt;/li&gt;
&lt;li&gt; What is the problem with Functional Programming?&lt;/li&gt;
&lt;li&gt;Can you define OOP and the 4 principles of OOP?&lt;/li&gt;
&lt;li&gt;What are Classes and Objects?&lt;/li&gt;
&lt;li&gt; What is Inheritance?&lt;/li&gt;
&lt;li&gt;What is Polymorphism, overloading, overriding and virtual?&lt;/li&gt;
&lt;li&gt; Can you explain encapsulation and abstraction?&lt;/li&gt;
&lt;li&gt;What is an abstract class?&lt;/li&gt;
&lt;li&gt; Define Interface &amp;amp; What is the diff. between abstract &amp;amp; interface?&lt;/li&gt;
&lt;li&gt; What problem does Delegate Solve ?&lt;/li&gt;
&lt;li&gt; What is a Multicast delegate ?&lt;/li&gt;
&lt;li&gt; What are events and what&#39;s the difference between delegates and events?&lt;/li&gt;
&lt;li&gt; How can we make Asynchronous method calls using delegates ?&lt;/li&gt;
&lt;li&gt; What is a stack, Heap, Value types and Reference types ?&lt;/li&gt;
&lt;li&gt; What is boxing and unboxing ?&lt;/li&gt;
&lt;li&gt; Can you explain ASP.NET application and Page life cycle ?&lt;/li&gt;
&lt;li&gt; What is Authentication, Authorization, Principal &amp;amp; Identity objects? &lt;/li&gt;
&lt;li&gt; How can we do Inproc and outProc session management ?&lt;/li&gt;
&lt;li&gt; How can we  windows , forms and passport authentication and authorization in ASP.NET ?&lt;/li&gt;
&lt;li&gt; In a parent child relationship which constructor fires first ?&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 25px; padding: 10px;&quot;&gt;  &lt;b&gt;MVC ASP.NET Q &amp;amp; A series&lt;/b&gt; &lt;/div&gt;&lt;ul style=&quot;font-size: 12px; font-weight: normal; line-height: 25px; margin-left: 15px; padding-left: 15px; width: 650px;&quot;&gt;&lt;li&gt; How to create a simple &quot;Hello World&quot; using ASP.NET MVC template? - Lab 1&lt;/li&gt;
&lt;li&gt; How to pass data from controller to views? - Lab 2&lt;/li&gt;
&lt;li&gt;Can we see a simple sample of model using MVC template? - Lab 3&lt;/li&gt;
&lt;li&gt; How can we create simple input screens using MVC template? - Lab 4&lt;/li&gt;
&lt;li&gt;How can we create MVC views faster and make them strong typed by using HTML helper? - Lab 5&lt;/li&gt;
&lt;li&gt;Can we see how easy it is do unit testing for MVC application? - Lab 6&lt;/li&gt;
&lt;li&gt; What is MVC routing? - Lab 7&lt;/li&gt;
&lt;li&gt;How can we set default values &amp;amp; validate MVC routes? - Lab 8&lt;/li&gt;
&lt;li&gt; How we can define actions &amp;amp; navigate from one page to other page? - Lab 9&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 25px; padding: 10px;&quot;&gt; &lt;b&gt;WCF, WPF, Silverlight, LINQ, Azure and EF 4.0 interview question and answers&lt;/b&gt; &lt;/div&gt;&lt;ul style=&quot;font-size: 12px; font-weight: normal; line-height: 25px; margin-left: 15px; padding-left: 15px; width: 650px;&quot;&gt;&lt;li&gt; What is SOA, Services and Messages ?&lt;/li&gt;
&lt;li&gt; What is the difference between Service and Component? &lt;/li&gt;
&lt;li&gt; What are basic steps to create a WCF service ?&lt;/li&gt;
&lt;li&gt; What are endpoints, address, contracts and bindings? &lt;/li&gt;
&lt;li&gt; What are various ways of hosting WCF service? &lt;/li&gt;
&lt;li&gt; What is the difference of hosting a WCF service on IIS and Self hosting?&lt;/li&gt;
&lt;li&gt; What is the difference between BasicHttpBinding and WsHttpBinding?&lt;/li&gt;
&lt;li&gt; How can we do debugging and tracing in WCF?&lt;/li&gt;
&lt;li&gt; Can you explain transactions in WCF (theory)?&lt;/li&gt;
&lt;li&gt; How can we self host WCF service ?&lt;/li&gt;
&lt;li&gt; What are the different ways of implementing WCF Security?&lt;/li&gt;
&lt;li&gt; How can we implement SSL security on WCF(Transport Security)?&lt;/li&gt;
&lt;li&gt; How can we implement transport security plus message security in WCF ?&lt;/li&gt;
&lt;li&gt; How can we do WCF instancing ?&lt;/li&gt;
&lt;li&gt; How Can we do WCF Concurency and throttling?&lt;/li&gt;
&lt;li&gt; Can you explain the architecture of Silverlight ?&lt;/li&gt;
&lt;li&gt; What are the basic things needed to make a silverlight application ?&lt;/li&gt;
&lt;li&gt; How can we do transformations in SilverLight ?&lt;/li&gt;
&lt;li&gt; Can you explain animation fundamentals in SilverLight?&lt;/li&gt;
&lt;li&gt; What are the different layout methodologies in SilverLight?&lt;/li&gt;
&lt;li&gt; Can you explain one way , two way and one time bindings?&lt;/li&gt;
&lt;li&gt; How can we consume WCF service in SilverLight?&lt;/li&gt;
&lt;li&gt; How can we connect databases using SilverLight?&lt;/li&gt;
&lt;li&gt; What is LINQ and can you explain same with example?&lt;/li&gt;
&lt;li&gt; Can you explain a simple example of LINQ to SQL?&lt;/li&gt;
&lt;li&gt; How can we define relationships using LINQ to SQL?&lt;/li&gt;
&lt;li&gt; How can we optimize LINQ relationships queries using ‘DataLoadOptions’?&lt;/li&gt;
&lt;li&gt; Can we see a simple example of how we can do CRUD using LINQ to SQL?&lt;/li&gt;
&lt;li&gt; How can we call a stored procedure using LINQ?&lt;/li&gt;
&lt;li&gt; What is the need of WPF when we had GDI, GDI+ and DirectX?&lt;/li&gt;
&lt;li&gt; Can you explain how we can make a simple WPF application?&lt;/li&gt;
&lt;li&gt; Can you explain the three rendering modes i.e. Tier 0 , Tier 1 and Tier 2? &lt;/li&gt;
&lt;li&gt; Can you explain the Architecture of WPF? &lt;/li&gt;
&lt;li&gt; What is Azure?&lt;/li&gt;
&lt;li&gt; Can you explain Azure Costing?&lt;/li&gt;
&lt;li&gt; Can we see a simple Azure sample program?&lt;/li&gt;
&lt;li&gt; What are the different steps to create a simple Worker application?&lt;/li&gt;
&lt;li&gt; Can we understand Blobs in steps, Tables &amp;amp; Queues ?&lt;/li&gt;
&lt;li&gt; Can we see a simple example for Azure tables?&lt;/li&gt;
&lt;li&gt; What is Package and One click deploy(Deployment Part - 1) ?&lt;/li&gt;
&lt;li&gt; What is Web.config transformation (Deployment Part-2)?&lt;/li&gt;
&lt;li&gt; What is MEF and how can we implement the same?&lt;/li&gt;
&lt;li&gt; How is MEF different from DIIOC?&lt;/li&gt;
&lt;li&gt; Can you show us a simple implementation of MEF in Silverlight ?&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: 12px; font-weight: bold; line-height: 25px; padding: 10px;&quot;&gt; Design pattern, Estimation, VSTS, Project management interview questions and answers &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt; Design Pattern Training / Interview Questions and Answers&lt;/b&gt; &lt;/div&gt;&lt;ul style=&quot;font-size: 12px; font-weight: normal; line-height: 25px; margin-left: 15px; padding-left: 15px; width: 650px;&quot;&gt;&lt;li&gt; Introduction &lt;/li&gt;
&lt;li&gt; Factory Design Pattern &lt;/li&gt;
&lt;li&gt; Abstract Factory Design Pattern&lt;/li&gt;
&lt;li&gt; Builder Design Pattern&lt;/li&gt;
&lt;li&gt; Prototype Design Pattern&lt;/li&gt;
&lt;li&gt; Singleton Design Pattern&lt;/li&gt;
&lt;li&gt; Adapter Design Pattern&lt;/li&gt;
&lt;li&gt; Bridge Design Pattern&lt;/li&gt;
&lt;li&gt; Composite Design Pattern&lt;/li&gt;
&lt;li&gt; Decorator Design Pattern&lt;/li&gt;
&lt;li&gt; Facade Design Pattern&lt;/li&gt;
&lt;li&gt; Flyweight Design Pattern&lt;/li&gt;
&lt;li&gt; Proxy Design Pattern&lt;/li&gt;
&lt;li&gt; Mediator Design Pattern&lt;/li&gt;
&lt;li&gt; Memento Design Pattern&lt;/li&gt;
&lt;li&gt; Interpreter Design Pattern&lt;/li&gt;
&lt;li&gt; Iterator Design Pattern&lt;/li&gt;
&lt;li&gt; COR Design Pattern&lt;/li&gt;
&lt;li&gt; Command Design Pattren&lt;/li&gt;
&lt;li&gt; State Design Pattern&lt;/li&gt;
&lt;li&gt; Strategy Design Pattern&lt;/li&gt;
&lt;li&gt; Observer Design Pattern&lt;/li&gt;
&lt;li&gt; Template Design Pattern&lt;/li&gt;
&lt;li&gt; Visitor Design Pattern &lt;/li&gt;
&lt;li&gt; Dependency IOC Design pattern&lt;/li&gt;
&lt;li&gt; MVC , MVP , DI IOC and MVVM Training / Interview Questions and Answers&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: 12px; font-weight: bold; line-height: 25px; padding: 10px;&quot;&gt; UML Training / Interview Questions and Answers &lt;/div&gt;&lt;ul style=&quot;font-size: 12px; font-weight: normal; line-height: 25px; margin-left: 15px; margin-top: 15px; padding-left: 15px; width: 650px;&quot;&gt;&lt;li&gt; Introduction&lt;/li&gt;
&lt;li&gt; Use Case Diagrams&lt;/li&gt;
&lt;li&gt; Class Digrams&lt;/li&gt;
&lt;li&gt; Object Diagrams&lt;/li&gt;
&lt;li&gt; Sequence Digrams&lt;/li&gt;
&lt;li&gt; Collaboration Diagrams&lt;/li&gt;
&lt;li&gt; Activity Diagram&lt;/li&gt;
&lt;li&gt; State chart Diagrams&lt;/li&gt;
&lt;li&gt; Component Diagrams&lt;/li&gt;
&lt;li&gt; Deployment Diagrams&lt;/li&gt;
&lt;li&gt; Stereo Types Diagrams&lt;/li&gt;
&lt;li&gt; Package Diagram  and UML Project Flow.&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: 12px; font-weight: bold; line-height: 25px; padding: 10px;&quot;&gt; Function points Training / Interview Questions and Answers &lt;/div&gt;&lt;ul style=&quot;font-size: 12px; font-weight: normal; line-height: 25px; margin-left: 15px; margin-top: 15px; padding-left: 15px; width: 650px;&quot;&gt;&lt;li&gt; Introduction&lt;/li&gt;
&lt;li&gt; Application Boundary&lt;/li&gt;
&lt;li&gt; EI Fundamentals&lt;/li&gt;
&lt;li&gt; EO Fundamentals&lt;/li&gt;
&lt;li&gt; EQ Fundamentals&lt;/li&gt;
&lt;li&gt; EIF&lt;/li&gt;
&lt;li&gt; Fundamentals&lt;/li&gt;
&lt;li&gt; ILF Fundamentals&lt;/li&gt;
&lt;li&gt; GSC Fundamentals&lt;/li&gt;
&lt;li&gt; Productivity Factor&lt;/li&gt;
&lt;li&gt; Costing and a complete estimation of customer screen using function points.&lt;/li&gt;
&lt;li&gt; FXCOP and Stylecop Training / Interview Questions and Answers&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: 12px; font-weight: bold; line-height: 25px; padding: 10px;&quot;&gt; VSTS Training / Interview Questions and Answers &lt;/div&gt;&lt;ul style=&quot;font-size: 12px; font-weight: normal; line-height: 25px; margin-left: 15px; margin-top: 15px; padding-left: 15px; width: 650px;&quot;&gt;&lt;li&gt; VSTS questions and answer videos&lt;/li&gt;
&lt;li&gt; What is Unit Testing &amp;amp; can we see an example of the same?&lt;/li&gt;
&lt;li&gt; How can we write data driven test using NUNIT &amp;amp; VS Test?&lt;/li&gt;
&lt;li&gt; Can we see simple example of a unit test for database operation?&lt;/li&gt;
&lt;li&gt; How can we do automated testing using Visual Studio Test?&lt;/li&gt;
&lt;li&gt; How can we do Load Testing using VSTS test?&lt;/li&gt;
&lt;li&gt; Can you explain database unit testing?&lt;/li&gt;
&lt;li&gt; How can we do test coverage using VSTS system?&lt;/li&gt;
&lt;li&gt; How can we do manual Testing using VSTS?&lt;/li&gt;
&lt;li&gt; What is Ordered Test in VSTS test?&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: 12px; font-weight: bold; line-height: 25px; padding: 10px;&quot;&gt; Enterprise Application Blocks Training &lt;/div&gt;&lt;ul style=&quot;font-size: 12px; font-weight: normal; line-height: 25px; margin-left: 15px; margin-top: 15px; padding-left: 15px; width: 650px;&quot;&gt;&lt;li&gt; Introduction&lt;/li&gt;
&lt;li&gt; Validation Application Block&lt;/li&gt;
&lt;li&gt; Logging Application Block&lt;/li&gt;
&lt;li&gt; Exception error Handling&lt;/li&gt;
&lt;li&gt; Data Application Block&lt;/li&gt;
&lt;li&gt; Caching Application Block&lt;/li&gt;
&lt;li&gt; Security Application Block&lt;/li&gt;
&lt;li&gt; Policy Injection Application Block and&lt;/li&gt;
&lt;li&gt; Unity Application Block&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: 12px; font-weight: bold; line-height: 25px; padding: 10px;&quot;&gt; Complete .NET invoicing project end to end &lt;/div&gt;&lt;ul style=&quot;font-size: 12px; font-weight: normal; line-height: 25px; margin-left: 15px; margin-top: 15px; padding-left: 15px; width: 650px;&quot;&gt;&lt;li&gt; Introduction to .NET Projects &lt;/li&gt;
&lt;li&gt; Different levels of Programming &lt;/li&gt;
&lt;li&gt; Necessary Tools &lt;/li&gt;
&lt;li&gt; What should we learn ? &lt;/li&gt;
&lt;li&gt; The IIS &lt;/li&gt;
&lt;li&gt; Making UI using .net IDE &lt;/li&gt;
&lt;li&gt; Database, The SQL Server &lt;/li&gt;
&lt;li&gt; Connecting ASP.net with Database &lt;/li&gt;
&lt;li&gt; Loading the Data Grid &lt;/li&gt;
&lt;li&gt; Update and Delete &lt;/li&gt;
&lt;li&gt; Validations &lt;/li&gt;
&lt;li&gt; Issue with the Code &lt;/li&gt;
&lt;li&gt; Two Tier Architecture &lt;/li&gt;
&lt;li&gt; Three Tier Architecture &lt;/li&gt;
&lt;li&gt; Database Normalization &lt;/li&gt;
&lt;li&gt; Session and State Management &lt;/li&gt;
&lt;li&gt; Using Enterprise Application Block &lt;/li&gt;
&lt;li&gt; Aggregation and Composition &lt;/li&gt;
&lt;li&gt; Implementing Interfaces and Factory&lt;/li&gt;
&lt;li&gt; Inheritance relationship &lt;/li&gt;
&lt;li&gt; Abstract Class Implementation&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: 12px; font-weight: bold; line-height: 25px; padding: 10px;&quot;&gt; Share point interview Training / Interview Questions and Answers videos &lt;/div&gt;&lt;ul style=&quot;font-size: 12px; font-weight: normal; line-height: 25px; margin-left: 15px; margin-top: 15px; padding-left: 15px; width: 650px;&quot;&gt;&lt;li&gt; What is SharePoint, WSS and MOSS? &lt;/li&gt;
&lt;li&gt; How does WSS actually work? &lt;/li&gt;
&lt;li&gt; What is Site and SiteCollection?&lt;/li&gt;
&lt;li&gt; What is the use of SQL server in SharePoint &amp;amp; use of Virtual path provider?&lt;/li&gt;
&lt;li&gt; What is Ghosting and UnGhosting in SharePoint?&lt;/li&gt;
&lt;li&gt; How can we create a site in SharePoint?&lt;/li&gt;
&lt;li&gt; How can we Customize a SharePoint Site?&lt;/li&gt;
&lt;li&gt; What kind of readymade functional modules exists collaboration?&lt;/li&gt;
&lt;li&gt; Can you display a simple Custom Page in SharePoint?&lt;/li&gt;
&lt;li&gt; How can we implement behind code ASPX pages in SharePoint?&lt;/li&gt;
&lt;li&gt; What is the concept of features in SharePoint?&lt;/li&gt;
&lt;li&gt; I want a feature to be only displayed to admin?&lt;/li&gt;
&lt;li&gt; How do we debug SharePoint error’s? &lt;/li&gt;
&lt;li&gt; Why customized pages are parsed using no-compile mode?&lt;/li&gt;
&lt;li&gt; Can you explain WSS model? &lt;/li&gt;
&lt;li&gt; How can we use custom controls in SharePoint? &lt;/li&gt;
&lt;li&gt; How can we display ASCX control in SharePoint pages?&lt;/li&gt;
&lt;li&gt; What are Web Parts?&lt;/li&gt;
&lt;li&gt; How can we deploy a simple Webpart in SharePoint?&lt;/li&gt;
&lt;li&gt; How can we achieve customization and personalization using WebParts?&lt;/li&gt;
&lt;li&gt; How can we create custom editor for WebPart?&lt;/li&gt;
&lt;li&gt; SharePoint is about centralizing documents, how similar is to the windows folder?&lt;/li&gt;
&lt;li&gt; What are custom fields and content types?&lt;/li&gt;
&lt;li&gt; Can you explain SharePoint Workflows?&lt;/li&gt;
&lt;li&gt; What is a three-state Workflow in SharePoint?&lt;/li&gt;
&lt;li&gt; How can we create sharepoint workflow using sharepoint designer?&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: 12px; font-weight: bold; line-height: 25px; padding: 10px;&quot;&gt; .NET best practices and SQL Server Training / Interview Questions and Answers &lt;/div&gt;&lt;ul style=&quot;font-size: 12px; font-weight: normal; line-height: 25px; margin-left: 15px; margin-top: 15px; padding-left: 15px; width: 650px;&quot;&gt;&lt;li&gt; Basics :- Query plan, Logical operators and Logical reads&lt;/li&gt;
&lt;li&gt; Point 1 :- Unique keys improve table scan performance.&lt;/li&gt;
&lt;li&gt; Point 2 :- Choose Table scan for small &amp;amp; Seek scan for large records&lt;/li&gt;
&lt;li&gt; Point 3 :- Use Covering index to reduce RID (Row Identifier) lookup&lt;/li&gt;
&lt;li&gt; Point4:- Keep index size as small as possible.&lt;/li&gt;
&lt;li&gt; Point5:- use numeric as compared to text data type.&lt;/li&gt;
&lt;li&gt; Point6:- use indexed view for aggregated SQL Queries &lt;/li&gt;
&lt;li&gt; Finding high memory consuming functions &lt;/li&gt;
&lt;li&gt; Improve garbage collector performance using finalize/dispose pattern&lt;/li&gt;
&lt;li&gt; How to use performance counters to gather performance data&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/4179366776492525203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/4179366776492525203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/4179366776492525203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/4179366776492525203'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/09/interview-questions-and-answer-on.html' title='Interview Questions and Answer on .Net,C#,ASP.NET,SQL Server'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-7430988763358966578</id><published>2011-09-14T12:40:00.000-07:00</published><updated>2011-09-14T12:42:02.000-07:00</updated><title type='text'>What is URL Routing?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;font-family: Verdana, Geneva, sans-serif; font: normal normal bold 20px/normal Verdana, Geneva, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.75em; position: relative; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;What is URL Routing?&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;post-header&quot; style=&quot;font-family: Verdana, Geneva, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;div class=&quot;post-header-line-1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-8808492854770115377&quot; style=&quot;position: relative; text-align: -webkit-auto; width: 920px;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 1.4; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;URL&amp;nbsp;&lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD8&quot; style=&quot;background-attachment: scroll !important; background-clip: initial !important; background-image: none !important; background-origin: initial !important; background-position: 0% 50%; border-bottom-color: rgb(0, 153, 0) !important; border-bottom-style: dotted !important; border-bottom-width: 1px !important; color: #009900; cursor: pointer !important; display: inline !important; float: none !important; padding-bottom: 1px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static;&quot;&gt;routing&lt;/span&gt;&amp;nbsp;was a capability we first introduced with ASP.NET 3.5 SP1, and which is already used within ASP.NET MVC applications to expose clean, SEO-friendly “web 2.0” URLs.&amp;nbsp; URL&amp;nbsp;routinglets you configure an application to accept request URLs that do not map to physical files. Instead, you can use&amp;nbsp;routing&amp;nbsp;to define URLs that are semantically meaningful to users and that can help with search-engine optimization (SEO).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: arial; font-size: xx-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 1.4; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; position: relative; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: arial;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Mapping URLs using ASP.NET MVC&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 1.4; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: arial; font-size: x-small; line-height: 18px;&quot;&gt;The URL&amp;nbsp;Routing&amp;nbsp;engine introduced with ASP.NET 3.5 SP1 provides a powerful way to handle incoming URLs.&amp;nbsp; Typically you write code as part of application startup to register/map URLs that match a specific URL format to code handlers.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;div style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 1.4; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: arial; font-size: x-small; line-height: 18px;&quot;&gt;Below is an example of how you can use ASP.NET MVC today to map the&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: arial; font-size: small; line-height: 18px;&quot;&gt;/products/software&lt;/i&gt;&lt;span style=&quot;font-family: arial; font-size: x-small; line-height: 18px;&quot;&gt;&amp;nbsp;URL to a controller class called “&lt;/span&gt;&lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD4&quot; style=&quot;background-attachment: scroll !important; background-clip: initial !important; background-image: none !important; background-origin: initial !important; background-position: 0% 50%; border-bottom-color: rgb(0, 153, 0) !important; border-bottom-style: dotted !important; border-bottom-width: 1px !important; color: #009900; cursor: pointer !important; display: inline !important; float: none !important; font-family: arial; font-size: x-small; line-height: 18px; padding-bottom: 1px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static;&quot;&gt;Products&lt;/span&gt;&lt;span style=&quot;font-family: arial; font-size: x-small; line-height: 18px;&quot;&gt;” that has an action method named “Browse”:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: arial; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style=&quot;font-family: Verdana, Geneva, sans-serif; font-size: xx-small; line-height: 1.4;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 1px; border-color: initial !important; border-left-color: rgb(236, 236, 236); border-left-width: 1px; border-right-color: rgb(236, 236, 236); border-right-width: 1px; border-style: initial !important; border-top-color: rgb(236, 236, 236); border-top-style: solid; border-top-width: 1px; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px;&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtEAAAD5CAIAAABuy/4iAAAgAElEQVR4nO3db2wbR57m8X6TIBPsDnIGboHYwMCDuZ3c+i4YaBy+mTe7iL15c7s7ixhZQI6jjBZ3Tl4MdrPebAzsu8S2mFhxBgd7X0RO1oP44AwyNh2TL8aIMByeVhYMI6cIlEIpIKxxFEbRCIYgCIYgMBT7XvykYqm6utn81yTF7wd5obSaXUW2xXpYVaxyXAAAgNZzmnu5tbW1lZWVxcXFeQAA0G0KhcLKysrKykpz44FoNHOsra3l8/nJyck0AADYXe7cuZPL5ZaXl9uZOVZXV+fm5iYmJozKffrpp5OTkzMzM+0OagAAoGa5XG5yctLblTA2NjYzM7O0tBRp5lhbW5uamlKVmJiYyOfzLeqEAQAAbfTgwYP5+fk7d+6odv/27dt1d3vUk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UkEkxMTFjXG/UTKnO4rlsqlebn52WcRWZ4sHoHAAC9Y2Nj4+7duzLRU9bhqHWuZ9jMIYrFYj6fV+Xdvn07n8/T7QEAwG714MGDhYWFTz/9NL0tm83WN8WztswhpF9F9XnI/iyTk5O5XG5+fn5+fn5xcXEeAAB0m8XFxXv37s3Pz8/NzU1OTt6+fVu19ZlMJpvNNtLRUE/mUFZWVvL5vMwwBQAAu8/4+Hgul1teXm58jdCGMofy4MGDlZWVlZWVduczAADQBMvLyysrK82dPtGczAEAABDs/wPxmNR5UMtg3wAAAABJRU5ErkJggg==&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 1px; border-color: initial !important; border-left-color: rgb(236, 236, 236); border-left-width: 1px; border-right-color: rgb(236, 236, 236); border-right-width: 1px; border-style: initial !important; border-top-color: rgb(236, 236, 236); border-top-style: solid; border-top-width: 1px; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot; /&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;/span&gt; &lt;div style=&quot;font-family: arial; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 1.4;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;line-height: 1.4;&quot;&gt;The first “products-browse” parameter to the MapRoute() helper method above is a friendly name for the route.&amp;nbsp; The second&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;line-height: 1.4;&quot;&gt;“products/{category}”&lt;/i&gt;&lt;span style=&quot;line-height: 1.4;&quot;&gt;&amp;nbsp;parameter is the URL filter that matches the&lt;/span&gt;&lt;i style=&quot;line-height: 1.4;&quot;&gt;/products/software&lt;/i&gt;&lt;span style=&quot;line-height: 1.4;&quot;&gt;&amp;nbsp;URL – and which treats the second segment of the URL as a parameter value called “category”.&amp;nbsp; This parameter will then be passed to the ProductsController’s Browse() action method to process.&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 1.4; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; position: relative; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: arial;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Mapping URLs using ASP.NET Web Forms&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 1.4; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: arial; font-size: x-small; line-height: 18px;&quot;&gt;ASP.NET 4.0 now allows you to also use the URL&amp;nbsp;Routing&amp;nbsp;engine to map URLs to ASP.NET Web Forms pages as well as ASP.NET MVC Controllers.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;div style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 1.4; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 18px;&quot;&gt;Below is an example of how you can use the new&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-size: small; line-height: 18px;&quot;&gt;MapPageRoute()&lt;/i&gt;&lt;span style=&quot;font-size: x-small; line-height: 18px;&quot;&gt;&amp;nbsp;helper method in ASP.NET 4.0 to map the&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-size: small; line-height: 18px;&quot;&gt;/products/software&lt;/i&gt;&lt;span style=&quot;font-size: x-small; line-height: 18px;&quot;&gt;&amp;nbsp;URL to a “Products.aspx” page that lives immediately under&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD12&quot; style=&quot;background-attachment: scroll !important; background-clip: initial !important; background-image: none !important; background-origin: initial !important; background-position: 0% 50%; border-bottom-color: rgb(0, 153, 0) !important; border-bottom-style: dotted !important; border-bottom-width: 1px !important; color: #009900; cursor: pointer !important; display: inline !important; float: none !important; font-size: x-small; line-height: 18px; padding-bottom: 1px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static;&quot;&gt;the application&lt;/span&gt;&lt;span style=&quot;font-size: x-small; line-height: 18px;&quot;&gt;&amp;nbsp;root directory:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: arial; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 1px; border-color: initial !important; border-left-color: rgb(236, 236, 236); border-left-width: 1px; border-right-color: rgb(236, 236, 236); border-right-width: 1px; border-style: initial !important; border-top-color: rgb(236, 236, 236); border-top-style: solid; border-top-width: 1px; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; font-family: Verdana, Geneva, sans-serif; font-size: xx-small; line-height: 1.4;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhMAAAEMCAIAAADxqaOgAAAgAElEQVR4nO3dbWwcx53n8X5jw2vsBj4Bd4ClQ6DF3q1xugsOjMI3eXNB7PWb2yfEcBaUZDo6HBy/OFx8wm4E7DtbtsYRIwcHaV+s5MQH62AvHJmyOAdEWOJm5xiaEAQdQwyZIYOBeDI9oRlCIAiCIIjxkHUv/mSxWF3d7Id56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qbSysuJ81TP/IfMhzmuwAACHhFxtOzY21mw2nTvsS456vV4qle7du9eRugEAskju5Ai5N3xfcjSbTZlMX15ebn/dAACZs7m5WS6Xg67HFZ71b3lQyfj4eFAnBQCQY5VKpVQqVSqVkH3s5FC7EyMLCwttqxgAIIvW1tbkrvDwe/scybG8vCxzI+vr622rHgAgW5rNpvQcDnxuuiM51G5vZWJigit0AeCQiN7yu5NDJ8/k5CQTHgCQew8ePIg+2uRODqXUxsaGXGdVrVZbWj0AQLbIM0SCnozrF5gcSqmVlRW5NqtSqTBsBQC5JA8aKZVKDx8+jPiWsORQSj169GhsbExuD3Q+MREA0KOazaYswhErNtSByaGUWl9fn5iYkPEv7hAEgHxYW1uT+ewEbfvByaGUajQa8kgrmTNfXV1NVE8AQPdtbm5Wq1Vp0icmJkLuFQ8SKTmUUs1mc35+XkauZOaDuz0AoLdsbm4+ePBAJrDlvo1kc9hRk0M0Go1araZLvXv3bq1WowsCAFm2vr6+sLBw//790q5KpZJm6jpecgjp6ej+hzznanJyslqtzs/Pz8/PLy4uzgMAumFxcfHhw4fz8/Nzc3OTk5N3797VbXW5XK5UKulP95Mkh7ayslKr1WT+HACQTePj49VqdXl5uVV3dqdKDm19fX1lZWVlZaXbWQsA2LG8vLyystKOCYXWJAcA4PAgOQAA8ZAcAIB4SA4AQDwkBwAgnv8PyRVdDLoxZtgAAAAASUVORK5CYII=&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 1px; border-color: initial !important; border-left-color: rgb(236, 236, 236); border-left-width: 1px; border-right-color: rgb(236, 236, 236); border-right-width: 1px; border-style: initial !important; border-top-color: rgb(236, 236, 236); border-top-style: solid; border-top-width: 1px; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; cursor: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot; /&gt;&lt;/div&gt;&lt;/span&gt; &lt;div style=&quot;font-family: arial; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: arial; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style=&quot;font-family: Verdana, Geneva, sans-serif; font-size: x-small; line-height: 1.4;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The first two parameters to the&amp;nbsp;&lt;i&gt;MapPageRoute()&amp;nbsp;&lt;/i&gt;helper are the same as in&amp;nbsp;&lt;i&gt;MapRoute().&lt;/i&gt;&amp;nbsp;The first parameter provides a friendly name for the route, and the second specifies the URL format to match.&amp;nbsp; The third parameter, though, points to a&amp;nbsp;Products.aspx page to handle the URL instead of a controller class.&amp;nbsp; You can optionally specify additional parameters to&amp;nbsp;&lt;i&gt;MapPageRoute()&amp;nbsp;&lt;/i&gt;that take advantage of features like “route constraints” and provide “default values for parameters” just like you can with ASP.NET MVC based route registrations.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Within the&amp;nbsp;Products.aspx page you can then write code like below that uses the new&amp;nbsp;&lt;i&gt;Page.RouteData&lt;/i&gt;&amp;nbsp;property in ASP.NET 4.0 to retrieve the “category” parameter value mapped using the&lt;i&gt;/products/{category}&lt;/i&gt;&amp;nbsp;URL filter, and then databind the category&amp;nbsp;products&amp;nbsp;to display them:&lt;/div&gt;&lt;/span&gt; &lt;span style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 1px; border-color: initial !important; border-left-color: rgb(236, 236, 236); border-left-width: 1px; border-right-color: rgb(236, 236, 236); border-right-width: 1px; border-style: initial !important; border-top-color: rgb(236, 236, 236); border-top-style: solid; border-top-width: 1px; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; font-family: Verdana, Geneva, sans-serif; font-size: xx-small; line-height: 1.4;&quot;&gt;&lt;div style=&quot;text-align: justify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3wqTT6du3b4fv5RMYpdTdu3cnJibo6UvX+zIBAAAklUqlQh99qVddVE2BUUqtr69PTU1R3g0PYAIAwP5hbW2N1uMb8/+1BUYpVS6X6TVltOy/urpav50AAK4zV3UAAADtSURBVAB6hs3NzXw+T25/amrK/8S+iyCBUUpVKpWFhQVKl9GqDJ6SAQCA5LG5uXnr1i1agKfnXRpegw8VGKJcLhcKBV3x9PR0oVBAQAMAAL3O+vr64uLijRs30lVyuVyTS+/1CQxBoZOOZujdZdlsNp/PLywsLCwsLC0tLQAAAOhWlpaWbt++vbCwMD8/n81mp6entT/PZDK5XK4lkUMjAqMplUqFQoFuAQAAANC7TE5O5vP5lZWVFj5c35TAaNbX10ulUqlU6rQqAwAAqIOVlZVSqRTTSkdrBAYAAAAwgMAAAACIBQgMAACAWPh/AblT4VipqgkAAAAASUVORK5CYII=&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 1px; border-color: initial !important; border-left-color: rgb(236, 236, 236); border-left-width: 1px; border-right-color: rgb(236, 236, 236); border-right-width: 1px; border-style: initial !important; border-top-color: rgb(236, 236, 236); border-top-style: solid; border-top-width: 1px; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; cursor: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot; /&gt;&lt;/div&gt;&lt;/span&gt; &lt;div style=&quot;font-family: arial; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style=&quot;font-family: Verdana, Geneva, sans-serif; font-size: x-small; line-height: 1.4;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;In addition to programmatically accessing incoming route parameters using code like above, you can also take advantage of the new declarative &lt;asp:routeparameter&gt; control with any ASP.NET DataSource control to declaratively bind a value from a route as well.&amp;nbsp; For example, below we are using a &lt;asp:routeparameter&gt; statement to bind the select statement’s @category parameter from the&amp;nbsp;&lt;i&gt;/products/{category}&lt;/i&gt;&amp;nbsp;parameter in the URL route:&lt;/asp:routeparameter&gt;&lt;/asp:routeparameter&gt;&lt;/div&gt;&lt;/span&gt; &lt;div style=&quot;font-family: arial; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 1px; border-color: initial !important; border-left-color: rgb(236, 236, 236); border-left-width: 1px; border-right-color: rgb(236, 236, 236); border-right-width: 1px; border-style: initial !important; border-top-color: rgb(236, 236, 236); border-top-style: solid; border-top-width: 1px; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; font-family: Verdana, Geneva, sans-serif; font-size: xx-small; line-height: 1.4;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 1px; border-color: initial !important; border-left-color: rgb(236, 236, 236); border-left-width: 1px; border-right-color: rgb(236, 236, 236); border-right-width: 1px; border-style: initial !important; border-top-color: rgb(236, 236, 236); border-top-style: solid; border-top-width: 1px; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; font-size: xx-small; line-height: 1.4;&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAjUAAACfCAIAAACOb79uAAAgAElEQVR4nO2dTWwcx5XH+yIj2IMQ55Y4MnYvplfIZWOIBuRbFtiTD8EKXIBOlpKBjZGjIRsRooM/VhYph0ouDgKYiIFcYhqw4w/SdgJpMSAYgWAEYSTT9JDGWFyBJrg0IQwIZjwYjGe69vBmim+qXtXUfHF6mv8fDGPUU931qrv5/v1e19SLFAAAAJA8okEbAAAAAAhAnwAAACQR6BMAAIAk0hd92t/fL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 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-color: rgb(236, 236, 236); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial !important; border-left-color: rgb(236, 236, 236); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(236, 236, 236); border-right-style: solid; border-right-width: 1px; border-style: initial !important; border-top-color: rgb(236, 236, 236); border-top-style: solid; border-top-width: 1px; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; cursor: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: xx-small; line-height: 1.4;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt; &lt;div style=&quot;font-family: arial; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: arial; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 1.4; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; position: relative; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: arial;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Retrieving URLs within an ASP.NET Web Form&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;div style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 1.4; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 18px;&quot;&gt;The URL&amp;nbsp;routing&amp;nbsp;engine in ASP.NET can be used to both map incoming URLs to code handlers, as well as be used to programmatically generate outgoing URLs using the same mapping registration logic.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Verdana, Geneva, sans-serif; font-size: x-small; line-height: 1.4;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;For example, above when we mapped the&amp;nbsp;&lt;i&gt;/products/{category}&lt;/i&gt;&amp;nbsp;URL we gave it a “friendly name” of “products-browse”.&amp;nbsp; This allows us to now also use the new&amp;nbsp;&lt;i&gt;Page.GetRouteUrl()&lt;/i&gt;&amp;nbsp;helper method to lookup the route within the URL&amp;nbsp;routing&amp;nbsp;system, optionally specify parameters to it, and then retrieve an actual URL that it maps back to.&amp;nbsp; For example, the below code would retrieve a URL value of “/products/software”:&lt;/div&gt;&lt;/span&gt; &lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 22px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 1px; border-color: initial !important; border-left-color: rgb(236, 236, 236); border-left-width: 1px; border-right-color: rgb(236, 236, 236); border-right-width: 1px; border-style: initial !important; border-top-color: rgb(236, 236, 236); border-top-style: solid; border-top-width: 1px; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; font-family: Verdana, Geneva, sans-serif; font-size: xx-small; line-height: 1.4;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnYAAAA/CAIAAADi/hIjAAANTElEQVR4nO2dQYjb2BnHdWkpSxtCbt2FMr00bSCHJZnLHju5F7rsISmdZQpNeyzZkD2X7O5skiaX7SUTdimbJQkhnU0mhw4NVYWZ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TQajRHWYhpdYjmtVsuyLMuy0h58AAAAAMnQaDQsy4r5MDQBiQUAAACAH0gsAAAAMBYgsQAAAMBYgMQCAAAAY+H/SGuFqbYMZQcAAAAASUVORK5CYII=&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 1px; border-color: initial !important; border-left-color: rgb(236, 236, 236); border-left-width: 1px; border-right-color: rgb(236, 236, 236); border-right-width: 1px; border-style: initial !important; border-top-color: rgb(236, 236, 236); border-top-style: solid; border-top-width: 1px; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; cursor: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot; /&gt;&lt;/div&gt;&lt;/span&gt; &lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 1.4;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;You can access the above helper method within either your code-behind file or within your .aspx markup.&amp;nbsp;&lt;/div&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 1.4;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;line-height: 1.4;&quot;&gt;There is also now a&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;line-height: 1.4;&quot;&gt;Response.RedirectToRoute()&lt;/i&gt;&lt;span style=&quot;line-height: 1.4;&quot;&gt;&amp;nbsp;set of methods that you can use to&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD11&quot; style=&quot;background-attachment: scroll !important; background-clip: initial !important; background-image: none !important; background-origin: initial !important; background-position: 0% 50%; border-bottom-color: rgb(0, 153, 0) !important; border-bottom-style: dotted !important; border-bottom-width: 1px !important; color: #009900; cursor: pointer !important; display: inline !important; float: none !important; line-height: 1.4; padding-bottom: 1px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static;&quot;&gt;redirect&lt;/span&gt;&lt;span style=&quot;line-height: 1.4;&quot;&gt;&amp;nbsp;users to a route (regardless of whether it is a MVC or Web Forms handled one) and optionally pass parameters to it.&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;h3 style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 1.4; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; position: relative; text-align: justify;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Handling PostBack Scenarios&lt;/span&gt;&lt;/u&gt;&lt;/h3&gt;&lt;span style=&quot;font-family: Verdana, Geneva, sans-serif; font-size: x-small; line-height: 1.4;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;URL&amp;nbsp;Routing&amp;nbsp;with ASP.NET 4.0 fully supports postback scenarios.&amp;nbsp; The&lt;/div&gt;&lt;/span&gt;&lt;form runat=&quot;”server”&quot; style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 1.4;&quot;&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 18px;&quot;&gt;control will automatically emit the same URL that caused the page to be rendered.&amp;nbsp; For example, if you access a page with a&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-size: small; line-height: 18px;&quot;&gt;/products/software&lt;/i&gt;&lt;span style=&quot;font-size: x-small; line-height: 18px;&quot;&gt;&amp;nbsp;URL then any server-side  control within it would render out a  HTML element back to the client – which means that any postback scenarios that happen on the page will preserve the original URL.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;This makes supporting clean, SEO friendly, URLs easy with Web Forms and postback scenarios – and avoids some of the tricks people need to use today when using URL rewriting modules to achieve similar effects.&amp;nbsp;&lt;/div&gt;&lt;/span&gt;&lt;/form&gt;&lt;/span&gt;&lt;div style=&quot;font-family: Verdana, Geneva, sans-serif; line-height: 1.4;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/7430988763358966578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/7430988763358966578' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/7430988763358966578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/7430988763358966578'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/09/what-is-url-routing.html' title='What is URL Routing?'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-8566883500624441557</id><published>2011-09-14T00:38:00.000-07:00</published><updated>2011-09-14T00:38:06.263-07:00</updated><title type='text'>ASP.NET TreeView Sort</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;b&gt;Easy way to sort nodes in a TreeView using a recursive function.&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
A few days ago, I needed to sort the nodes of a tree view. The solutions that I found over the Internet did not please me, so I decided to write my own. This solution is a simple recursive function that sorts tree nodes in an alphabetic order.&lt;br /&gt;
&lt;br /&gt;
Create your tree view and add your nodes:&lt;br /&gt;
&lt;div class=&quot;pre-action-link&quot; id=&quot;premain0&quot; style=&quot;display: block;&quot; width=&quot;100%&quot;&gt;&lt;a href=&quot;http://www.blogger.com/post-create.g?blogID=5095462228187295903#&quot; preid=&quot;0&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/div&gt;&lt;pre id=&quot;pre0&quot; lang=&quot;cs&quot; style=&quot;margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: #fff2cc;&quot;&gt;TreeView mytree = &lt;/span&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;background-color: #fff2cc;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: #fff2cc;&quot;&gt;&lt;span style=&quot;background-color: #fff2cc;&quot;&gt; TreeView();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;code-comment&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;add your nodes here&lt;/span&gt;&lt;/pre&gt;Then simply call the sort function with the main node as the argument:&lt;br /&gt;
&lt;div class=&quot;pre-action-link&quot; id=&quot;premain1&quot; style=&quot;display: block;&quot; width=&quot;100%&quot;&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/post-create.g?blogID=5095462228187295903#&quot; preid=&quot;1&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre id=&quot;pre1&quot; lang=&quot;cs&quot; style=&quot;background-color: #fff2cc; margin-top: 0pt;&quot;&gt;sort(node);&lt;/pre&gt;&lt;br /&gt;
Here is the recursive function:&lt;br /&gt;
&lt;div class=&quot;pre-action-link&quot; id=&quot;premain2&quot; style=&quot;background-color: #fff2cc; display: block;&quot; width=&quot;100%&quot;&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/post-create.g?blogID=5095462228187295903#&quot; preid=&quot;2&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre id=&quot;pre2&quot; lang=&quot;cs&quot; style=&quot;background-color: #fff2cc; margin-top: 0pt;&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;void&lt;/span&gt; sort(TreeNode node)
{
    &lt;span class=&quot;code-keyword&quot;&gt;foreach&lt;/span&gt; (TreeNode n &lt;span class=&quot;code-keyword&quot;&gt;in&lt;/span&gt; node.ChildNodes)
        sort(n);
    &lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;

    {
        TreeNode temp = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
        List&amp;lt;TreeNode&amp;gt; childs = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; List&amp;lt;TreeNode&amp;gt;();
        &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt;(node.ChildNodes.Count&amp;gt;0)
        {
            &lt;span class=&quot;code-keyword&quot;&gt;foreach&lt;/span&gt; (TreeNode n &lt;span class=&quot;code-keyword&quot;&gt;in&lt;/span&gt; node.ChildNodes)
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (temp == &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; || n.Text[&lt;span class=&quot;code-digit&quot;&gt;0&lt;/span&gt;] &amp;lt; temp.Text[&lt;span class=&quot;code-digit&quot;&gt;0&lt;/span&gt;])
                    temp = n;
            node.ChildNodes.Remove(temp);
            childs.Add(temp);
            temp = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
        }
        node.ChildNodes.Clear();
        &lt;span class=&quot;code-keyword&quot;&gt;foreach&lt;/span&gt; (TreeNode a &lt;span class=&quot;code-keyword&quot;&gt;in&lt;/span&gt; childs)
            node.ChildNodes.Add(a);
    }
    &lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; { }
}&lt;/pre&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/8566883500624441557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/8566883500624441557' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/8566883500624441557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/8566883500624441557'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/09/aspnet-treeview-sort.html' title='ASP.NET TreeView Sort'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-897227645843968907</id><published>2011-09-13T22:19:00.001-07:00</published><updated>2011-09-13T22:31:16.005-07:00</updated><title type='text'>7 Page Jump Methods in ASP.NET</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;h2 style=&quot;background-color: white; color: #ff9900; font-family: Verdana, Arial, sans-serif; font-size: 13pt; text-align: -webkit-auto;&quot;&gt;Introduction&lt;/h2&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;In the technology of Web development, we have many different methods for page jump. We can use methods provided by ASP.NET built-in objects achieve page jump. We can according to ASP.NET provided server control and HTML control achieve page jump. And we can also use javascript to program formula achieve page jump. Here we will discuss 7 methods for page jump in ASP.NET.&lt;/div&gt;&lt;h2 style=&quot;background-color: white; color: #ff9900; font-family: Verdana, Arial, sans-serif; font-size: 13pt; text-align: -webkit-auto;&quot;&gt;Page Jump Methods&lt;/h2&gt;&lt;h3 style=&quot;background-color: white; color: #ff9900; font-family: Verdana, Arial, sans-serif; font-size: 11pt; text-align: -webkit-auto;&quot;&gt;1、 Make use of HTML tags&lt;/h3&gt;&lt;h3 style=&quot;background-color: white; color: #ff9900; font-family: Verdana, Arial, sans-serif; font-size: 11pt; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-size: x-small; font-weight: normal;&quot;&gt;&amp;lt;a href=”test.aspx”&amp;gt;test page&lt;span style=&quot;color: black; font-size: x-small; font-weight: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;background-color: white; color: #ff9900; font-family: Verdana, Arial, sans-serif; font-size: 11pt; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-size: 13px; font-weight: normal;&quot;&gt;This example is very simple. Just use href property of tag to formulate the url of jump page to achieve jump.&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;background-color: white; color: #ff9900; font-family: Verdana, Arial, sans-serif; font-size: 11pt; text-align: -webkit-auto;&quot;&gt;2、 HyperLink Control&lt;/h3&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;This the most normal method:&lt;/div&gt;&lt;ul style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;li style=&quot;font-size: 10pt;&quot;&gt;ASP.NET server control NavigateUrl property specify the destination of Url address.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;NavigateUrl can be modified by code in server. This is different with&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;Because of HyperLink has no event, we need set NavigateUrl in server.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;Example code:&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: white; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&lt;span style=&quot;font-family: Verdana, Arial, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;asp:hyperlink id=&quot;”hyperlink”&quot; runat=&quot;”server”&quot; navigateurl=&quot;”test.aspx”&quot;&amp;gt;ok&amp;lt;/asp:hyperlink &amp;gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 style=&quot;background-color: white; color: #ff9900; font-family: Verdana, Arial, sans-serif; font-size: 11pt; text-align: -webkit-auto;&quot;&gt;3、Response.Redirect()&lt;/h3&gt;&lt;ul style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;li style=&quot;font-size: 10pt;&quot;&gt;Process: Send an Http response to client and inform client jump to a new page. Then, send jump request to server from client.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;After page jump, all information stored in inside control lost. When A jumped to B, page B can’t visit information submitted by page A.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;Use this method to jump page the Url information in browser address will be changed.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;Use Session Cookies Application object to deliver data between pages.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;Redirect happens at client and will involve twice contact with Web server: request for original page, request for redirect new page&lt;/li&gt;
&lt;div style=&quot;font-size: 10pt;&quot;&gt;This method is not fast because it has 2 postback. But it can jump to any page, no limitation from pages. And at the same time, it can’t pass the login protect.&lt;/div&gt;&lt;li style=&quot;font-size: 10pt;&quot;&gt;example code:&lt;/li&gt;
&lt;div style=&quot;font-size: 10pt;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;Now we add a Button control and program code in relevant cs file.&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; id=&quot;premain0&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;a href=&quot;http://www.blogger.com/%E2%80%9Dtest.aspx%E2%80%9D&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/%E2%80%9Dtest.aspx%E2%80%9D&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/%E2%80%9Dtest.aspx%E2%80%9D&quot;&gt;&lt;img height=&quot;9&quot; id=&quot;preimg0&quot; preid=&quot;0&quot; src=&quot;http://www.codeproject.com/images/minus.gif&quot; style=&quot;cursor: pointer; overflow-x: auto; overflow-y: auto;&quot; width=&quot;9&quot; /&gt;&lt;span id=&quot;precollapse0&quot; preid=&quot;0&quot; style=&quot;cursor: pointer; margin-bottom: 0px;&quot;&gt;&amp;nbsp;Collapse&lt;/span&gt;&amp;nbsp;|&amp;nbsp;&lt;/a&gt;&lt;a href=&quot;http://www.codeproject.com/KB/aspnet/pagejump.aspx#&quot; preid=&quot;0&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;Copy Code&lt;/a&gt;&lt;/div&gt;&lt;pre id=&quot;pre0&quot; style=&quot;background-color: #fbedbb; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Button1_Click1(object sender, EventArgs e)
{
Response.Redirect(&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;http://www.e-iceblue.com&quot;&lt;/span&gt;);
}
&lt;/pre&gt;&lt;/ul&gt;&lt;h3 style=&quot;background-color: white; color: #ff9900; font-family: Verdana, Arial, sans-serif; font-size: 11pt; text-align: -webkit-auto;&quot;&gt;4、Server.Transfer()&lt;/h3&gt;&lt;ul style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;li style=&quot;font-size: 10pt;&quot;&gt;Achieve page jump and at the same time exchange control&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;During page jump process, information stored by Request Session will not change. And it’s available to use the information in the page before jump.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;After page jump. Url in browser address will not change&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;The redirect request of this method is processed in server. Browser doesn’t know happened a jump.&lt;/li&gt;
&lt;div style=&quot;font-size: 10pt;&quot;&gt;Fast speed! Only need 1 postback but have t under the same site because it’s a method from server. In addition, it can pass login protection.&lt;/div&gt;&lt;li style=&quot;font-size: 10pt;&quot;&gt;example code:&lt;/li&gt;
&lt;div class=&quot;pre-action-link&quot; id=&quot;premain1&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;img height=&quot;9&quot; id=&quot;preimg1&quot; preid=&quot;1&quot; src=&quot;http://www.codeproject.com/images/minus.gif&quot; style=&quot;cursor: pointer; overflow-x: auto; overflow-y: auto;&quot; width=&quot;9&quot; /&gt;&lt;span id=&quot;precollapse1&quot; preid=&quot;1&quot; style=&quot;cursor: pointer; margin-bottom: 0px;&quot;&gt;&amp;nbsp;Collapse&lt;/span&gt;&amp;nbsp;|&amp;nbsp;&lt;a href=&quot;http://www.codeproject.com/KB/aspnet/pagejump.aspx#&quot; preid=&quot;1&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;Copy Code&lt;/a&gt;&lt;/div&gt;&lt;pre id=&quot;pre1&quot; style=&quot;background-color: #fbedbb; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Button1_Click(object sender, EventArgs e)
{
Server.Transfer(&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;Server2.aspx&quot;&lt;/span&gt;);
}
&lt;/pre&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt;&amp;nbsp;the path is virtual path which means it can formulate in page from the same category but can’t formulate unconditional address.&lt;/div&gt;&lt;/ul&gt;&lt;h3 style=&quot;background-color: white; color: #ff9900; font-family: Verdana, Arial, sans-serif; font-size: 11pt; text-align: -webkit-auto;&quot;&gt;5、 Server.Execute()&lt;/h3&gt;&lt;ul style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;li style=&quot;font-size: 10pt;&quot;&gt;This method allows the present page execute another page in server.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;After execute page, back to original page and send Server.Execute() position.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;This is similar with a function cite against page. The requested page can use original page information and consult string assemble.&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;Set EnableViewStateMac property as False&lt;/li&gt;
&lt;li style=&quot;font-size: 10pt;&quot;&gt;example code&lt;/li&gt;
&lt;div class=&quot;pre-action-link&quot; id=&quot;premain2&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;img height=&quot;9&quot; id=&quot;preimg2&quot; preid=&quot;2&quot; src=&quot;http://www.codeproject.com/images/minus.gif&quot; style=&quot;cursor: pointer; overflow-x: auto; overflow-y: auto;&quot; width=&quot;9&quot; /&gt;&lt;span id=&quot;precollapse2&quot; preid=&quot;2&quot; style=&quot;cursor: pointer; margin-bottom: 0px;&quot;&gt;&amp;nbsp;Collapse&lt;/span&gt;&amp;nbsp;|&amp;nbsp;&lt;a href=&quot;http://www.codeproject.com/KB/aspnet/pagejump.aspx#&quot; preid=&quot;2&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;Copy Code&lt;/a&gt;&lt;/div&gt;&lt;pre id=&quot;pre2&quot; style=&quot;background-color: #fbedbb; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Button1_Click(object sender, EventArgs e)
{
Server.Execute(&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;Server2.aspx&quot;&lt;/span&gt;);
}
&lt;/pre&gt;&lt;div style=&quot;font-size: 10pt;&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt;&amp;nbsp;only virtual path here&lt;/div&gt;&lt;/ul&gt;&lt;h3 style=&quot;background-color: white; color: #ff9900; font-family: Verdana, Arial, sans-serif; font-size: 11pt; text-align: -webkit-auto;&quot;&gt;6、Javascript achieve page jump&lt;/h3&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;We can make use of javascript in page program formula to achieve page jump&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; id=&quot;premain3&quot; style=&quot;background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-family: Verdana, Arial, sans-serif; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;img height=&quot;9&quot; id=&quot;preimg3&quot; preid=&quot;3&quot; src=&quot;http://www.codeproject.com/images/minus.gif&quot; style=&quot;cursor: pointer; overflow-x: auto; overflow-y: auto;&quot; width=&quot;9&quot; /&gt;&lt;span id=&quot;precollapse3&quot; preid=&quot;3&quot; style=&quot;cursor: pointer; margin-bottom: 0px;&quot;&gt;&amp;nbsp;Collapse&lt;/span&gt;&amp;nbsp;|&amp;nbsp;&lt;a href=&quot;http://www.codeproject.com/KB/aspnet/pagejump.aspx#&quot; preid=&quot;3&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;Copy Code&lt;/a&gt;&lt;/div&gt;&lt;pre id=&quot;pre3&quot; style=&quot;background-color: white; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: -webkit-auto; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;script type=&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;text/javascript&quot;&lt;/span&gt; language=&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;javascript&quot;&lt;/span&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt; directly jump page 
&lt;/span&gt;window.location.href = &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;hello.html&#39;&lt;/span&gt;;
&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt; definite time to jump page
&lt;/span&gt;setTimeout(&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;javascript:location.href=&#39;hello.html&#39;&quot;&lt;/span&gt;, &lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;5000&lt;/span&gt;);
&lt;/pre&gt;&lt;h3 style=&quot;background-color: white; color: #ff9900; font-family: Verdana, Arial, sans-serif; font-size: 11pt; text-align: -webkit-auto;&quot;&gt;7、Respone.Write()&lt;/h3&gt;&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;In the Write method incoming javascript to achieve page jump.&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; id=&quot;premain4&quot; style=&quot;background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; font-family: Verdana, Arial, sans-serif; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;&lt;img height=&quot;9&quot; id=&quot;preimg4&quot; preid=&quot;4&quot; src=&quot;http://www.codeproject.com/images/minus.gif&quot; style=&quot;cursor: pointer; overflow-x: auto; overflow-y: auto;&quot; width=&quot;9&quot; /&gt;&lt;span id=&quot;precollapse4&quot; preid=&quot;4&quot; style=&quot;cursor: pointer; margin-bottom: 0px;&quot;&gt;&amp;nbsp;Collapse&lt;/span&gt;&amp;nbsp;|&amp;nbsp;&lt;a href=&quot;http://www.codeproject.com/KB/aspnet/pagejump.aspx#&quot; preid=&quot;4&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;Copy Code&lt;/a&gt;&lt;/div&gt;&lt;pre id=&quot;pre4&quot; style=&quot;background-color: white; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: -webkit-auto; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;Respose.Write( &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt; &lt;script code-string&quot;=&quot;&quot; language=&quot;&amp;lt;/span&amp;gt;&amp;lt;span class=&quot; style=&quot;color: purple;&quot;&gt;
&#39;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple; &quot;&gt;javascript&quot; &#39;&lt;/span&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue; &quot;&gt;&gt;&lt;/span&gt; window.open( &lt;span class=&quot;code-string&quot; style=&quot;color: purple; &quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple; &quot;&gt; &quot;+ url + &quot; &#39;&lt;/span&gt;);
 &lt;span class=&quot;code-string&quot; style=&quot;color: purple; &quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple; &quot;&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/DIV&gt;&lt;/script&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/897227645843968907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/897227645843968907' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/897227645843968907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/897227645843968907'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/09/7-page-jump-methods-in-aspnet.html' title='7 Page Jump Methods in ASP.NET'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-2478472889230813182</id><published>2011-08-16T03:26:00.000-07:00</published><updated>2011-08-16T03:27:16.335-07:00</updated><title type='text'>Encrypting all the Stored Procedures of a Database</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;If you ever decide that you need to protect your SQL Stored Procedures, and thought encrypting was a good idea, BE VERY CAREFUL!!! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Encrypting Database stored procedures SHOULD NOT be done without having backup files or some sort of Source Control for the stored procedures. The reason I say this is because, once they are encrypted, there is no turning around. (Yes, there are third party tools that will decrypt your code, but Why go through that trouble.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This trick is something I developed because my company needed to host the application on a different server, and we were concerned about our code being compromised. So, to deliver the database, we decided to encrypt all out stored procedures.  Having over a hundred procedures written, I didn&#39;t want to open each procedure and paste &#39;WITH ENCRYPTION&#39; in each and every stored procedure. (For those of you who do not know how to encrypt, refer &lt;a href=&quot;http://www.codeproject.com/KB/database/ProtectSQLCodeObject.aspx&quot;&gt;How Do I Protect My Stored Procedure Code&lt;/a&gt;[&lt;a href=&quot;http://www.codeproject.com/KB/database/ProtectSQLCodeObject.aspx&quot; target=&quot;_blank&quot; title=&quot;New Window&quot;&gt;^&lt;/a&gt;]). So I decided to make my own little C# application that did the same. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This application is a console application made using Visual Studio 2005 and  SQL server 2005. The input parameters are database name, Server address, database username and password. Once you are able to provide these details, you are ready to have all your stored procedures encrypted. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have put the code of my application here as is. For this code to work, you will need to add an &quot;Microsft.SQlserver.SMO&quot; refrence to the application, so that the classes such as &quot;Database&quot; and &quot;StoredProcedure&quot; are accessible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BEFORE YOU DO THIS, TAKE A BACKUP!!!!!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;pre-action-link&quot; id=&quot;premain0&quot; style=&quot;display: block;&quot; width=&quot;100%&quot;&gt;&lt;a href=&quot;http://www.blogger.com/post-create.g?blogID=5095462228187295903#&quot; preid=&quot;0&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/div&gt;&lt;pre id=&quot;pre0&quot; lang=&quot;c#&quot; style=&quot;margin-top: 0pt;&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;Connect to the local, default instance of SQL Server. 
&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;string&lt;/span&gt; DB = &lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;;
ServerConnection objServerCOnnection = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ServerConnection();
objServerCOnnection.LoginSecure = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
Console.WriteLine(&lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt;Enter name or IP Address of the Database Server.&quot;&lt;/span&gt;);            
objServerCOnnection.ServerInstance = Console.ReadLine();
Console.WriteLine(&lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt;Enter name of the Database&quot;&lt;/span&gt;);
DB = Console.ReadLine();
Console.WriteLine(&lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt;Enter user id&quot;&lt;/span&gt;);
objServerCOnnection.Login = Console.ReadLine();
Console.WriteLine(&lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt;Enter Password&quot;&lt;/span&gt;);
objServerCOnnection.Password = Console.ReadLine();
Console.WriteLine(&lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt; &quot;&lt;/span&gt;);
Server srv = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Server();

&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; &lt;span class=&quot;code-comment&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt; Check to see if server connection details are ok.
&lt;/span&gt;{
   srv = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Server(objServerCOnnection);
   &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (srv == &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
   {
      Console.WriteLine(&lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt;Server details entered are wrong,&quot;&lt;/span&gt;

         + &lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt; Please restart the application&quot;&lt;/span&gt;);
      Console.ReadLine();
      System.Environment.Exit(System.Environment.ExitCode);
   }
}
&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt;
{
   Console.WriteLine(&lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt;Server details entered are wrong,&quot;&lt;/span&gt;
      + &lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt; Please restart the application&quot;&lt;/span&gt;);
   Console.ReadLine();
   System.Environment.Exit(System.Environment.ExitCode);
}
Database db = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Database();

&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; &lt;span class=&quot;code-comment&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt; Check to see if database exists.
&lt;/span&gt;{
   db = srv.Databases[DB];
   &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (db == &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
   {
      Console.WriteLine(&lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt;Database does not exist on the current server,&quot;&lt;/span&gt;
         + &lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt; Please restart the application&quot;&lt;/span&gt;);
      Console.ReadLine();
      System.Environment.Exit(System.Environment.ExitCode);
   }
}

&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt;
{
   Console.WriteLine(&lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt;Database does not exist on the current server,&quot;&lt;/span&gt;
      + &lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt; Please restart the application&quot;&lt;/span&gt;);
   Console.ReadLine();
   System.Environment.Exit(System.Environment.ExitCode);
}
&lt;span class=&quot;code-keyword&quot;&gt;string&lt;/span&gt; allSP = &lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;;
                

&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;code-keyword&quot;&gt;int&lt;/span&gt; i = &lt;span class=&quot;code-digit&quot;&gt;0&lt;/span&gt;; i &amp;lt; db.StoredProcedures.Count; i++)
{
   &lt;span class=&quot;code-comment&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;Define a StoredProcedure object variable by supplying the parent database 
&lt;/span&gt;   &lt;span class=&quot;code-comment&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;and name arguments in the constructor. 
&lt;/span&gt;   StoredProcedure sp;
   sp = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; StoredProcedure();
   sp = db.StoredProcedures[i];
   &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!sp.IsSystemObject)&lt;span class=&quot;code-comment&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt; Exclude System stored procedures

&lt;/span&gt;   {
      &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!sp.IsEncrypted) &lt;span class=&quot;code-comment&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt; Exclude already encrypted stored procedures
&lt;/span&gt;      {
         &lt;span class=&quot;code-keyword&quot;&gt;string&lt;/span&gt; text = &lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;;&lt;span class=&quot;code-comment&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt; = sp.TextBody;

&lt;/span&gt;         sp.TextMode = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
         sp.IsEncrypted = &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
         sp.TextMode = &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
         sp.Alter();
&amp;nbsp;
         Console.WriteLine(sp.Name); &lt;span class=&quot;code-comment&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt; display name of the encrypted SP.                        
&lt;/span&gt;         sp = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
         text = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
      }
   }
}&lt;/pre&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/2478472889230813182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/2478472889230813182' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/2478472889230813182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/2478472889230813182'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/08/encrypting-all-stored-procedures-of.html' title='Encrypting all the Stored Procedures of a Database'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-5486211532289061433</id><published>2011-08-15T12:20:00.000-07:00</published><updated>2011-08-15T12:20:37.767-07:00</updated><title type='text'>The Biggest Changes in C++11</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, Tahoma, Verdana; font-size: 13px; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h1 class=&quot;entry-title&quot; style=&quot;color: #0d5674; float: left; font-family: Georgia, Times, serif; font-size: 22px; line-height: 32px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 25px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center; text-decoration: none; width: 280px;&quot;&gt;The Biggest Changes in C++11 (and Why You Should Care)&lt;/h1&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, Tahoma, Verdana; font-size: 13px; line-height: 20px;&quot;&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #333333; font-family: Georgia, Times, serif; font-size: 15px; line-height: 22px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #333333; font-family: Georgia, Times, serif; font-size: 15px; line-height: 22px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #333333; font-family: Georgia, Times, serif; font-size: 15px; line-height: 22px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;It’s been 13 years since the first iteration of the C++ language. Danny Kalev, a former member of the C++ standards committee, explains how the programming language has been improved and how it can help you write better code.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Georgia, Times, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 22px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial, Tahoma, Verdana; font-size: 13px; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Bjarne Stroustrup, the creator of C++, said recently that C++11 “&lt;a href=&quot;http://www.codeguru.com/article.php/c18357&quot; style=&quot;color: #0d5674; font-family: Georgia, Times, serif; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;feels like a new language&lt;/a&gt;&amp;nbsp;— the pieces just fit together better.” Indeed, core C++11 has changed significantly. It now supports lambda expressions, automatic type deduction of objects, uniform initialization syntax, delegating constructors, deleted and defaulted function declarations,&amp;nbsp;&lt;code&gt;nullptr&lt;/code&gt;, and most importantly, rvalue references — a feature that augurs a paradigm shift in how one conceives and handles objects. And that’s just a sample.&lt;/div&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The C++11 Standard Library was also revamped with new algorithms, new container classes, atomic operations, type traits, regular expressions, new smart pointers,&amp;nbsp;&lt;code&gt;async()&lt;/code&gt;&amp;nbsp;facility, and of course a multithreading library.&lt;/div&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: #f7f7f7; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(230, 230, 230); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(230, 230, 230); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(230, 230, 230); border-top-style: solid; border-top-width: 1px; margin-bottom: 15px; margin-left: 15px; margin-right: 15px; margin-top: 5px; padding-bottom: 0px; padding-left: 15px; padding-right: 20px; padding-top: 10px;&quot;&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;A complete list of the new core and library features of C++11 is available&amp;nbsp;&lt;a href=&quot;http://www2.research.att.com/~bs/C++0xFAQ.html&quot; style=&quot;color: #0d5674; font-family: Georgia, Times, serif; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;After the approval of the C++ standard in 1998, two committee members prophesied that the next C++ standard would “certainly” include a built-in garbage collector (GC), and that it probably wouldn’t support multithreading because of the technical complexities involved in defining a portable threading model. Thirteen years later, the new C++ standard, C++11, is almost complete. Guess what? It lacks a GC but it does include a state-of–the-art threading library.&lt;/div&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;In this article I explain the biggest changes in the language, and why they are such a big deal. As you’ll see, threading libraries are not the only change. The new standard builds on the decades of expertise and makes C++ even more relevant. As&amp;nbsp;&lt;a href=&quot;http://www.informit.com/articles/article.aspx?p=1716874&quot; style=&quot;color: #0d5674; font-family: Georgia, Times, serif; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Rogers Cadenhead&lt;/a&gt;&amp;nbsp;points out, “That’s pretty amazing for something as old as disco, Pet Rocks, and Olympic swimmers with chest hair.”&lt;/div&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;First, let’s look at some of the prominent C++11 core-language features.&lt;/div&gt;&lt;h3 class=&quot;color-programming&quot; style=&quot;color: #a8be0e; font-family: Georgia, Times, serif; font-size: 20px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 10px; text-decoration: none;&quot;&gt;Lambda Expressions&lt;/h3&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;A lambda expression lets you define functions locally, at the place of the call, thereby eliminating much of the tedium and security risks that function objects incur. A lambda expression has the form:&lt;/div&gt;&lt;pre&gt;[capture](parameters)-&amp;gt;return-type {body}&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The&amp;nbsp;&lt;code&gt;[]&lt;/code&gt;&amp;nbsp;construct inside a function call’s argument list indicates the beginning of a lambda expression. Let’s see a lambda example.&lt;/div&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Suppose you want to count how many uppercase letters a string contains. Using&amp;nbsp;&lt;code&gt;for_each()&lt;/code&gt;&amp;nbsp;to traverses a char array, the following lambda expression determines whether each letter is in uppercase. For every uppercase letter it finds, the lambda expression increments&amp;nbsp;&lt;code&gt;Uppercase&lt;/code&gt;, a variable defined outside the lambda expression:&lt;/div&gt;&lt;pre&gt;int main()
{
   char s[]=&quot;Hello World!&quot;;
   int Uppercase = 0; //modified by the lambda
   for_each(s, s+sizeof(s), [&amp;amp;Uppercase] (char c) {
    if (isupper(c))
     Uppercase++;
    });
 cout&amp;lt;&amp;lt; Uppercase&amp;lt;&amp;lt;&quot; uppercase letters in: &quot;&amp;lt;&amp;lt; s&amp;lt;&lt;endl; pre=&quot;&quot; }&lt;=&quot;&quot;&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;It’s as if you defined a function whose body is placed inside another function call. The ampersand in&amp;nbsp;&lt;em&gt;[&amp;amp;Uppercase]&lt;/em&gt;&amp;nbsp;means that the lambda body gets a reference to&amp;nbsp;&lt;em&gt;Uppercase&lt;/em&gt;&amp;nbsp;so it can modify it. Without the ampersand,&amp;nbsp;&lt;em&gt;Uppercase&lt;/em&gt;&amp;nbsp;would be passed by value. C++11 lambdas include constructs for member functions as well.&lt;/div&gt;&lt;h3 class=&quot;color-programming&quot; style=&quot;color: #a8be0e; font-family: Georgia, Times, serif; font-size: 20px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 10px; text-decoration: none;&quot;&gt;Automatic Type Deduction and&amp;nbsp;&lt;code&gt;decltype&lt;/code&gt;&lt;/h3&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;In C++03, you must specify the type of an object when you declare it. Yet in many cases, an object’s declaration includes an initializer. C++11 takes advantage of this, letting you declare objects without specifying their types:&lt;/div&gt;&lt;pre&gt;auto x=0; //x has type int because 0 is int
auto c=&#39;a&#39;; //char
auto d=0.5; //double
auto national_debt=14400000000000LL;//long long&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Automatic type deduction is chiefly useful when the type of the object is verbose or when it’s automatically generated (in templates). Consider:&lt;/div&gt;&lt;pre&gt;void func(const vector&lt;int&gt; &amp;amp;vi)
{
vector&lt;int&gt;::const_iterator ci=vi.begin();
}&lt;/int&gt;&lt;/int&gt;&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Instead, you can declare the iterator like this:&lt;/div&gt;&lt;pre&gt;auto ci=vi.begin();&lt;/pre&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: #f7f7f7; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(230, 230, 230); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(230, 230, 230); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(230, 230, 230); border-top-style: solid; border-top-width: 1px; margin-bottom: 15px; margin-left: 15px; margin-right: 15px; margin-top: 5px; padding-bottom: 0px; padding-left: 15px; padding-right: 20px; padding-top: 10px;&quot;&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The keyword&amp;nbsp;&lt;code&gt;auto&lt;/code&gt;&amp;nbsp;isn’t new; it actually dates back the pre-ANSI C era. However, C++11 has changed its meaning;&amp;nbsp;&lt;code&gt;auto&lt;/code&gt;&amp;nbsp;no longer designates an object with automatic storage type. Rather, it declares an object whose type is deducible from its initializer. The old meaning of&amp;nbsp;&lt;code&gt;auto&amp;nbsp;&lt;/code&gt;was removed from C++11 to avoid confusion.&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;C++11 offers a similar mechanism for capturing the type of an object or an expression. The new operator&amp;nbsp;&lt;code&gt;decltype&lt;/code&gt;&amp;nbsp;takes an expression and “returns” its type:&lt;/div&gt;&lt;pre&gt;const vector&lt;int&gt; vi;
typedef decltype (vi.begin()) CIT;
CIT another_const_iterator;&lt;/int&gt;&lt;/pre&gt;&lt;h3 class=&quot;color-programming&quot; style=&quot;color: #a8be0e; font-family: Georgia, Times, serif; font-size: 20px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 10px; text-decoration: none;&quot;&gt;Uniform Initialization Syntax&lt;/h3&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;C++ has at least four different initialization notations, some of which overlap.&lt;/div&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Parenthesized initialization looks like this:&lt;/div&gt;&lt;pre&gt;std::string s(&quot;hello&quot;);
int m=int(); //default initialization&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;You can also use the&amp;nbsp;&lt;code&gt;=&lt;/code&gt;&amp;nbsp;notation for the same purpose in certain cases:&lt;/div&gt;&lt;pre&gt;std::string s=&quot;hello&quot;;
int x=5;&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;For POD aggregates, you use braces:&lt;/div&gt;&lt;pre&gt;int arr[4]={0,1,2,3};
struct tm today={0};&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Finally, constructors use member initializers:&lt;/div&gt;&lt;pre&gt;struct S {
 int x;
 S(): x(0) {} };&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;This proliferation is a fertile source for confusion, not only among novices. Worse yet, in C++03 you can’t initialize POD array members and POD arrays allocated using&amp;nbsp;&lt;code&gt;new[]&lt;/code&gt;. C++11 cleans up this mess with a uniform brace notation:&lt;/div&gt;&lt;pre&gt;class C
{
int a;
int b;
public:
 C(int i, int j);
};

C c {0,0}; //C++11 only. Equivalent to: C c(0,0);

int* a = new int[3] { 1, 2, 0 }; /C++11 only

class X {
  int a[4];
public:
  X() : a{1,2,3,4} {} //C++11, member array initializer
};&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;With respect to containers, you can say goodbye to a long list of&amp;nbsp;&lt;code&gt;push_back()&lt;/code&gt;&amp;nbsp;calls. In C++11 you can initialize containers intuitively:&lt;/div&gt;&lt;pre&gt;// C++11 container initializer
vector vs&lt;string&gt;={ &quot;first&quot;, &quot;second&quot;, &quot;third&quot;};
map singers =
  { {&quot;Lady Gaga&quot;, &quot;&lt;span class=&quot;skype_pnh_container&quot; dir=&quot;ltr&quot; style=&quot;background-attachment: scroll !important; background-color: transparent !important; background-image: none !important; background-position: 0px 0px !important; background-repeat: no-repeat no-repeat !important; border-bottom-color: rgb(0, 0, 0) !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-collapse: separate !important; border-color: initial !important; border-left-color: rgb(0, 0, 0) !important; border-left-style: none !important; border-left-width: 0px !important; border-right-color: rgb(0, 0, 0) !important; border-right-style: none !important; border-right-width: 0px !important; border-top-color: rgb(0, 0, 0) !important; border-top-style: none !important; border-top-width: 0px !important; bottom: auto !important; clear: none !important; clip: auto !important; color: rgb(73, 83, 90) !important; cursor: pointer !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Tahoma, Arial, Helvetica, sans-serif !important; font-size: 11px !important; font-style: normal !important; font-weight: bold !important; height: 14px !important; left: auto !important; letter-spacing: 0px !important; line-height: 14px !important; list-style-image: none !important; list-style-position: outside !important; list-style-type: disc !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; page-break-after: auto !important; page-break-before: auto !important; page-break-inside: auto !important; position: static !important; right: auto !important; table-layout: auto !important; text-align: left !important; text-decoration: none !important; text-indent: 0px !important; text-transform: none !important; top: auto !important; vertical-align: baseline !important; white-space: nowrap !important; width: auto !important; word-spacing: normal !important; z-index: 0 !important;&quot; tabindex=&quot;-1&quot;&gt;&amp;nbsp;&lt;span class=&quot;skype_pnh_highlighting_inactive_common&quot; dir=&quot;ltr&quot; skypeaction=&quot;skype_dropdown&quot; style=&quot;background-attachment: scroll !important; background-color: transparent !important; background-image: none !important; background-position: 0px 0px !important; background-repeat: no-repeat no-repeat !important; border-bottom-color: rgb(0, 0, 0) !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-collapse: separate !important; border-color: initial !important; border-left-color: rgb(0, 0, 0) !important; border-left-style: none !important; border-left-width: 0px !important; border-right-color: rgb(0, 0, 0) !important; border-right-style: none !important; border-right-width: 0px !important; border-top-color: rgb(0, 0, 0) !important; border-top-style: none !important; border-top-width: 0px !important; bottom: auto !important; clear: none !important; clip: auto !important; color: rgb(73, 83, 90) !important; cursor: pointer !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Tahoma, Arial, Helvetica, sans-serif !important; font-size: 11px !important; font-style: normal !important; font-weight: bold !important; height: 14px !important; left: auto !important; letter-spacing: 0px !important; line-height: 14px !important; list-style-image: none !important; list-style-position: outside !important; list-style-type: disc !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; page-break-after: auto !important; page-break-before: auto !important; page-break-inside: auto !important; position: static !important; right: auto !important; table-layout: auto !important; text-align: left !important; text-decoration: none !important; text-indent: 0px !important; text-transform: none !important; top: auto !important; vertical-align: baseline !important; white-space: nowrap !important; width: auto !important; word-spacing: normal !important; z-index: 0 !important;&quot; title=&quot;Call this phone number in United States of America with Skype: +12125557890&quot;&gt;&lt;span class=&quot;skype_pnh_left_span&quot; skypeaction=&quot;skype_dropdown&quot; style=&quot;background-attachment: scroll !important; background-color: transparent !important; background-image: url(chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/numbers_common_inactive_icon_set.gif) !important; background-position: 0px 0px !important; background-repeat: no-repeat no-repeat !important; border-bottom-color: rgb(0, 0, 0) !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-collapse: separate !important; border-color: initial !important; border-left-color: rgb(0, 0, 0) !important; border-left-style: none !important; border-left-width: 0px !important; border-right-color: rgb(0, 0, 0) !important; border-right-style: none !important; border-right-width: 0px !important; border-top-color: rgb(0, 0, 0) !important; border-top-style: none !important; border-top-width: 0px !important; bottom: auto !important; clear: none !important; clip: auto !important; color: rgb(73, 83, 90) !important; cursor: pointer !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Tahoma, Arial, Helvetica, sans-serif !important; font-size: 11px !important; font-style: normal !important; font-weight: bold !important; height: 14px !important; left: auto !important; letter-spacing: 0px !important; line-height: 14px !important; list-style-image: none !important; list-style-position: outside !important; list-style-type: disc !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; page-break-after: auto !important; page-break-before: auto !important; page-break-inside: auto !important; position: static !important; right: auto !important; table-layout: auto !important; text-align: left !important; text-decoration: none !important; text-indent: 0px !important; text-transform: none !important; top: auto !important; vertical-align: baseline !important; white-space: nowrap !important; width: 6px !important; word-spacing: normal !important; z-index: 0 !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;skype_pnh_dropart_span&quot; skypeaction=&quot;skype_dropdown&quot; style=&quot;background-attachment: scroll !important; background-color: transparent !important; background-image: url(chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/numbers_common_inactive_icon_set.gif) !important; background-position: -11px 0px !important; background-repeat: no-repeat no-repeat !important; border-bottom-color: rgb(0, 0, 0) !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-collapse: separate !important; border-color: initial !important; border-left-color: rgb(0, 0, 0) !important; border-left-style: none !important; border-left-width: 0px !important; border-right-color: rgb(0, 0, 0) !important; border-right-style: none !important; border-right-width: 0px !important; border-top-color: rgb(0, 0, 0) !important; border-top-style: none !important; border-top-width: 0px !important; bottom: auto !important; clear: none !important; clip: auto !important; color: rgb(73, 83, 90) !important; cursor: pointer !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Tahoma, Arial, Helvetica, sans-serif !important; font-size: 11px !important; font-style: normal !important; font-weight: bold !important; height: 14px !important; left: auto !important; letter-spacing: 0px !important; line-height: 14px !important; list-style-image: none !important; list-style-position: outside !important; list-style-type: disc !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; page-break-after: auto !important; page-break-before: auto !important; page-break-inside: auto !important; position: static !important; right: auto !important; table-layout: auto !important; text-align: left !important; text-decoration: none !important; text-indent: 0px !important; text-transform: none !important; top: auto !important; vertical-align: baseline !important; white-space: nowrap !important; width: 27px !important; word-spacing: normal !important; z-index: 0 !important;&quot; title=&quot;Skype actions&quot;&gt;&lt;span class=&quot;skype_pnh_dropart_flag_span&quot; skypeaction=&quot;skype_dropdown&quot; style=&quot;background-attachment: scroll !important; background-color: transparent !important; background-image: url(chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/flags.gif) !important; background-position: -5849px 1px !important; background-repeat: no-repeat no-repeat !important; border-bottom-color: rgb(0, 0, 0) !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-collapse: separate !important; border-color: initial !important; border-left-color: rgb(0, 0, 0) !important; border-left-style: none !important; border-left-width: 0px !important; border-right-color: rgb(0, 0, 0) !important; border-right-style: none !important; border-right-width: 0px !important; border-top-color: rgb(0, 0, 0) !important; border-top-style: none !important; border-top-width: 0px !important; bottom: auto !important; clear: none !important; clip: auto !important; color: rgb(73, 83, 90) !important; cursor: pointer !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Tahoma, Arial, Helvetica, sans-serif !important; font-size: 11px !important; font-style: normal !important; font-weight: bold !important; height: 14px !important; left: auto !important; letter-spacing: 0px !important; line-height: 14px !important; list-style-image: none !important; list-style-position: outside !important; list-style-type: disc !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; page-break-after: auto !important; page-break-before: auto !important; page-break-inside: auto !important; position: static !important; right: auto !important; table-layout: auto !important; text-align: left !important; text-decoration: none !important; text-indent: 0px !important; text-transform: none !important; top: auto !important; vertical-align: baseline !important; white-space: nowrap !important; width: 18px !important; word-spacing: normal !important; z-index: 0 !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;skype_pnh_textarea_span&quot; style=&quot;background-attachment: scroll !important; background-color: transparent !important; background-image: url(chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/numbers_common_inactive_icon_set.gif) !important; background-position: -125px 0px !important; background-repeat: no-repeat no-repeat !important; border-bottom-color: rgb(0, 0, 0) !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-collapse: separate !important; border-color: initial !important; border-left-color: rgb(0, 0, 0) !important; border-left-style: none !important; border-left-width: 0px !important; border-right-color: rgb(0, 0, 0) !important; border-right-style: none !important; border-right-width: 0px !important; border-top-color: rgb(0, 0, 0) !important; border-top-style: none !important; border-top-width: 0px !important; bottom: auto !important; clear: none !important; clip: auto !important; color: rgb(73, 83, 90) !important; cursor: pointer !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Tahoma, Arial, Helvetica, sans-serif !important; font-size: 11px !important; font-style: normal !important; font-weight: bold !important; height: 14px !important; left: auto !important; letter-spacing: 0px !important; line-height: 14px !important; list-style-image: none !important; list-style-position: outside !important; list-style-type: disc !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; page-break-after: auto !important; page-break-before: auto !important; page-break-inside: auto !important; position: static !important; right: auto !important; table-layout: auto !important; text-align: left !important; text-decoration: none !important; text-indent: 0px !important; text-transform: none !important; top: auto !important; vertical-align: baseline !important; white-space: nowrap !important; width: auto !important; word-spacing: normal !important; z-index: 0 !important;&quot;&gt;&lt;span class=&quot;skype_pnh_text_span&quot; style=&quot;background-attachment: scroll !important; background-color: transparent !important; background-image: url(chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/numbers_common_inactive_icon_set.gif) !important; background-position: -125px 0px !important; background-repeat: no-repeat no-repeat !important; border-bottom-color: rgb(0, 0, 0) !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-collapse: separate !important; border-color: initial !important; border-left-color: rgb(0, 0, 0) !important; border-left-style: none !important; border-left-width: 0px !important; border-right-color: rgb(0, 0, 0) !important; border-right-style: none !important; border-right-width: 0px !important; border-top-color: rgb(0, 0, 0) !important; border-top-style: none !important; border-top-width: 0px !important; bottom: auto !important; clear: none !important; clip: auto !important; color: rgb(73, 83, 90) !important; cursor: pointer !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Tahoma, Arial, Helvetica, sans-serif !important; font-size: 11px !important; font-style: normal !important; font-weight: bold !important; height: 14px !important; left: auto !important; letter-spacing: 0px !important; line-height: 14px !important; list-style-image: none !important; list-style-position: outside !important; list-style-type: disc !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 0px !important; padding-left: 5px !important; padding-right: 0px !important; padding-top: 0px !important; page-break-after: auto !important; page-break-before: auto !important; page-break-inside: auto !important; position: static !important; right: auto !important; table-layout: auto !important; text-align: left !important; text-decoration: none !important; text-indent: 0px !important; text-transform: none !important; top: auto !important; vertical-align: baseline !important; white-space: nowrap !important; width: auto !important; word-spacing: normal !important; z-index: 0 !important;&quot;&gt;+1 (212) 555-7890&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;skype_pnh_right_span&quot; style=&quot;background-attachment: scroll !important; background-color: transparent !important; background-image: url(chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/numbers_common_inactive_icon_set.gif) !important; background-position: -62px 0px !important; background-repeat: no-repeat no-repeat !important; border-bottom-color: rgb(0, 0, 0) !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-collapse: separate !important; border-color: initial !important; border-left-color: rgb(0, 0, 0) !important; border-left-style: none !important; border-left-width: 0px !important; border-right-color: rgb(0, 0, 0) !important; border-right-style: none !important; border-right-width: 0px !important; border-top-color: rgb(0, 0, 0) !important; border-top-style: none !important; border-top-width: 0px !important; bottom: auto !important; clear: none !important; clip: auto !important; color: rgb(73, 83, 90) !important; cursor: pointer !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Tahoma, Arial, Helvetica, sans-serif !important; font-size: 11px !important; font-style: normal !important; font-weight: bold !important; height: 14px !important; left: auto !important; letter-spacing: 0px !important; line-height: 14px !important; list-style-image: none !important; list-style-position: outside !important; list-style-type: disc !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; page-break-after: auto !important; page-break-before: auto !important; page-break-inside: auto !important; position: static !important; right: auto !important; table-layout: auto !important; text-align: left !important; text-decoration: none !important; text-indent: 0px !important; text-transform: none !important; top: auto !important; vertical-align: baseline !important; white-space: nowrap !important; width: 15px !important; word-spacing: normal !important; z-index: 0 !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&quot;},
    {&quot;Beyonce Knowles&quot;, &quot;&lt;span class=&quot;skype_pnh_container&quot; dir=&quot;ltr&quot; style=&quot;background-attachment: scroll !important; background-color: transparent !important; background-image: none !important; background-position: 0px 0px !important; background-repeat: no-repeat no-repeat !important; border-bottom-color: rgb(0, 0, 0) !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-collapse: separate !important; border-color: initial !important; border-left-color: rgb(0, 0, 0) !important; border-left-style: none !important; border-left-width: 0px !important; border-right-color: rgb(0, 0, 0) !important; border-right-style: none !important; border-right-width: 0px !important; border-top-color: rgb(0, 0, 0) !important; border-top-style: none !important; border-top-width: 0px !important; bottom: auto !important; clear: none !important; clip: auto !important; color: rgb(73, 83, 90) !important; cursor: pointer !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Tahoma, Arial, Helvetica, sans-serif !important; font-size: 11px !important; font-style: normal !important; font-weight: bold !important; height: 14px !important; left: auto !important; letter-spacing: 0px !important; line-height: 14px !important; list-style-image: none !important; list-style-position: outside !important; list-style-type: disc !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; page-break-after: auto !important; page-break-before: auto !important; page-break-inside: auto !important; position: static !important; right: auto !important; table-layout: auto !important; text-align: left !important; text-decoration: none !important; text-indent: 0px !important; text-transform: none !important; top: auto !important; vertical-align: baseline !important; white-space: nowrap !important; width: auto !important; word-spacing: normal !important; z-index: 0 !important;&quot; tabindex=&quot;-1&quot;&gt;&amp;nbsp;&lt;span class=&quot;skype_pnh_highlighting_inactive_common&quot; dir=&quot;ltr&quot; skypeaction=&quot;skype_dropdown&quot; style=&quot;background-attachment: scroll !important; background-color: transparent !important; background-image: none !important; background-position: 0px 0px !important; background-repeat: no-repeat no-repeat !important; border-bottom-color: rgb(0, 0, 0) !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-collapse: separate !important; border-color: initial !important; border-left-color: rgb(0, 0, 0) !important; border-left-style: none !important; border-left-width: 0px !important; border-right-color: rgb(0, 0, 0) !important; border-right-style: none !important; border-right-width: 0px !important; border-top-color: rgb(0, 0, 0) !important; border-top-style: none !important; border-top-width: 0px !important; bottom: auto !important; clear: none !important; clip: auto !important; color: rgb(73, 83, 90) !important; cursor: pointer !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Tahoma, Arial, Helvetica, sans-serif !important; font-size: 11px !important; font-style: normal !important; font-weight: bold !important; height: 14px !important; left: auto !important; letter-spacing: 0px !important; line-height: 14px !important; list-style-image: none !important; list-style-position: outside !important; list-style-type: disc !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; page-break-after: auto !important; page-break-before: auto !important; page-break-inside: auto !important; position: static !important; right: auto !important; table-layout: auto !important; text-align: left !important; text-decoration: none !important; text-indent: 0px !important; text-transform: none !important; top: auto !important; vertical-align: baseline !important; white-space: nowrap !important; width: auto !important; word-spacing: normal !important; z-index: 0 !important;&quot; title=&quot;Call this phone number in United States of America with Skype: +12125550987&quot;&gt;&lt;span class=&quot;skype_pnh_left_span&quot; skypeaction=&quot;skype_dropdown&quot; style=&quot;background-attachment: scroll !important; background-color: transparent !important; background-image: url(chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/numbers_common_inactive_icon_set.gif) !important; background-position: 0px 0px !important; background-repeat: no-repeat no-repeat !important; border-bottom-color: rgb(0, 0, 0) !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-collapse: separate !important; border-color: initial !important; border-left-color: rgb(0, 0, 0) !important; border-left-style: none !important; border-left-width: 0px !important; border-right-color: rgb(0, 0, 0) !important; border-right-style: none !important; border-right-width: 0px !important; border-top-color: rgb(0, 0, 0) !important; border-top-style: none !important; border-top-width: 0px !important; bottom: auto !important; clear: none !important; clip: auto !important; color: rgb(73, 83, 90) !important; cursor: pointer !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Tahoma, Arial, Helvetica, sans-serif !important; font-size: 11px !important; font-style: normal !important; font-weight: bold !important; height: 14px !important; left: auto !important; letter-spacing: 0px !important; line-height: 14px !important; list-style-image: none !important; list-style-position: outside !important; list-style-type: disc !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; page-break-after: auto !important; page-break-before: auto !important; page-break-inside: auto !important; position: static !important; right: auto !important; table-layout: auto !important; text-align: left !important; text-decoration: none !important; text-indent: 0px !important; text-transform: none !important; top: auto !important; vertical-align: baseline !important; white-space: nowrap !important; width: 6px !important; word-spacing: normal !important; z-index: 0 !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;skype_pnh_dropart_span&quot; skypeaction=&quot;skype_dropdown&quot; style=&quot;background-attachment: scroll !important; background-color: transparent !important; background-image: url(chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/numbers_common_inactive_icon_set.gif) !important; background-position: -11px 0px !important; background-repeat: no-repeat no-repeat !important; border-bottom-color: rgb(0, 0, 0) !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-collapse: separate !important; border-color: initial !important; border-left-color: rgb(0, 0, 0) !important; border-left-style: none !important; border-left-width: 0px !important; border-right-color: rgb(0, 0, 0) !important; border-right-style: none !important; border-right-width: 0px !important; border-top-color: rgb(0, 0, 0) !important; border-top-style: none !important; border-top-width: 0px !important; bottom: auto !important; clear: none !important; clip: auto !important; color: rgb(73, 83, 90) !important; cursor: pointer !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Tahoma, Arial, Helvetica, sans-serif !important; font-size: 11px !important; font-style: normal !important; font-weight: bold !important; height: 14px !important; left: auto !important; letter-spacing: 0px !important; line-height: 14px !important; list-style-image: none !important; list-style-position: outside !important; list-style-type: disc !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; page-break-after: auto !important; page-break-before: auto !important; page-break-inside: auto !important; position: static !important; right: auto !important; table-layout: auto !important; text-align: left !important; text-decoration: none !important; text-indent: 0px !important; text-transform: none !important; top: auto !important; vertical-align: baseline !important; white-space: nowrap !important; width: 27px !important; word-spacing: normal !important; z-index: 0 !important;&quot; title=&quot;Skype actions&quot;&gt;&lt;span class=&quot;skype_pnh_dropart_flag_span&quot; skypeaction=&quot;skype_dropdown&quot; style=&quot;background-attachment: scroll !important; background-color: transparent !important; background-image: url(chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/flags.gif) !important; background-position: -5849px 1px !important; background-repeat: no-repeat no-repeat !important; border-bottom-color: rgb(0, 0, 0) !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-collapse: separate !important; border-color: initial !important; border-left-color: rgb(0, 0, 0) !important; border-left-style: none !important; border-left-width: 0px !important; border-right-color: rgb(0, 0, 0) !important; border-right-style: none !important; border-right-width: 0px !important; border-top-color: rgb(0, 0, 0) !important; border-top-style: none !important; border-top-width: 0px !important; bottom: auto !important; clear: none !important; clip: auto !important; color: rgb(73, 83, 90) !important; cursor: pointer !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Tahoma, Arial, Helvetica, sans-serif !important; font-size: 11px !important; font-style: normal !important; font-weight: bold !important; height: 14px !important; left: auto !important; letter-spacing: 0px !important; line-height: 14px !important; list-style-image: none !important; list-style-position: outside !important; list-style-type: disc !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; page-break-after: auto !important; page-break-before: auto !important; page-break-inside: auto !important; position: static !important; right: auto !important; table-layout: auto !important; text-align: left !important; text-decoration: none !important; text-indent: 0px !important; text-transform: none !important; top: auto !important; vertical-align: baseline !important; white-space: nowrap !important; width: 18px !important; word-spacing: normal !important; z-index: 0 !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;skype_pnh_textarea_span&quot; style=&quot;background-attachment: scroll !important; background-color: transparent !important; background-image: url(chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/numbers_common_inactive_icon_set.gif) !important; background-position: -125px 0px !important; background-repeat: no-repeat no-repeat !important; border-bottom-color: rgb(0, 0, 0) !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-collapse: separate !important; border-color: initial !important; border-left-color: rgb(0, 0, 0) !important; border-left-style: none !important; border-left-width: 0px !important; border-right-color: rgb(0, 0, 0) !important; border-right-style: none !important; border-right-width: 0px !important; border-top-color: rgb(0, 0, 0) !important; border-top-style: none !important; border-top-width: 0px !important; bottom: auto !important; clear: none !important; clip: auto !important; color: rgb(73, 83, 90) !important; cursor: pointer !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Tahoma, Arial, Helvetica, sans-serif !important; font-size: 11px !important; font-style: normal !important; font-weight: bold !important; height: 14px !important; left: auto !important; letter-spacing: 0px !important; line-height: 14px !important; list-style-image: none !important; list-style-position: outside !important; list-style-type: disc !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; page-break-after: auto !important; page-break-before: auto !important; page-break-inside: auto !important; position: static !important; right: auto !important; table-layout: auto !important; text-align: left !important; text-decoration: none !important; text-indent: 0px !important; text-transform: none !important; top: auto !important; vertical-align: baseline !important; white-space: nowrap !important; width: auto !important; word-spacing: normal !important; z-index: 0 !important;&quot;&gt;&lt;span class=&quot;skype_pnh_text_span&quot; style=&quot;background-attachment: scroll !important; background-color: transparent !important; background-image: url(chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/numbers_common_inactive_icon_set.gif) !important; background-position: -125px 0px !important; background-repeat: no-repeat no-repeat !important; border-bottom-color: rgb(0, 0, 0) !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-collapse: separate !important; border-color: initial !important; border-left-color: rgb(0, 0, 0) !important; border-left-style: none !important; border-left-width: 0px !important; border-right-color: rgb(0, 0, 0) !important; border-right-style: none !important; border-right-width: 0px !important; border-top-color: rgb(0, 0, 0) !important; border-top-style: none !important; border-top-width: 0px !important; bottom: auto !important; clear: none !important; clip: auto !important; color: rgb(73, 83, 90) !important; cursor: pointer !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Tahoma, Arial, Helvetica, sans-serif !important; font-size: 11px !important; font-style: normal !important; font-weight: bold !important; height: 14px !important; left: auto !important; letter-spacing: 0px !important; line-height: 14px !important; list-style-image: none !important; list-style-position: outside !important; list-style-type: disc !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 0px !important; padding-left: 5px !important; padding-right: 0px !important; padding-top: 0px !important; page-break-after: auto !important; page-break-before: auto !important; page-break-inside: auto !important; position: static !important; right: auto !important; table-layout: auto !important; text-align: left !important; text-decoration: none !important; text-indent: 0px !important; text-transform: none !important; top: auto !important; vertical-align: baseline !important; white-space: nowrap !important; width: auto !important; word-spacing: normal !important; z-index: 0 !important;&quot;&gt;+1 (212) 555-0987&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;skype_pnh_right_span&quot; style=&quot;background-attachment: scroll !important; background-color: transparent !important; background-image: url(chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/numbers_common_inactive_icon_set.gif) !important; background-position: -62px 0px !important; background-repeat: no-repeat no-repeat !important; border-bottom-color: rgb(0, 0, 0) !important; border-bottom-style: none !important; border-bottom-width: 0px !important; border-collapse: separate !important; border-color: initial !important; border-left-color: rgb(0, 0, 0) !important; border-left-style: none !important; border-left-width: 0px !important; border-right-color: rgb(0, 0, 0) !important; border-right-style: none !important; border-right-width: 0px !important; border-top-color: rgb(0, 0, 0) !important; border-top-style: none !important; border-top-width: 0px !important; bottom: auto !important; clear: none !important; clip: auto !important; color: rgb(73, 83, 90) !important; cursor: pointer !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Tahoma, Arial, Helvetica, sans-serif !important; font-size: 11px !important; font-style: normal !important; font-weight: bold !important; height: 14px !important; left: auto !important; letter-spacing: 0px !important; line-height: 14px !important; list-style-image: none !important; list-style-position: outside !important; list-style-type: disc !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; page-break-after: auto !important; page-break-before: auto !important; page-break-inside: auto !important; position: static !important; right: auto !important; table-layout: auto !important; text-align: left !important; text-decoration: none !important; text-indent: 0px !important; text-transform: none !important; top: auto !important; vertical-align: baseline !important; white-space: nowrap !important; width: 15px !important; word-spacing: normal !important; z-index: 0 !important;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&quot;}};&lt;/string&gt;&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Similarly, C++11 supports in-class initialization of data members:&lt;/div&gt;&lt;pre&gt;class C
{
 int a=7; //C++11 only
public:
 C();
};&lt;/pre&gt;&lt;h3 class=&quot;color-programming&quot; style=&quot;color: #a8be0e; font-family: Georgia, Times, serif; font-size: 20px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 10px; text-decoration: none;&quot;&gt;Deleted and Defaulted Functions&lt;/h3&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;A function in the form:&lt;/div&gt;&lt;pre&gt;struct A
{
 A()=default; //C++11
 virtual ~A()=default; //C++11
};&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;is called a&amp;nbsp;&lt;em&gt;defaulted function&lt;/em&gt;. The&amp;nbsp;&lt;code&gt;=default;&lt;/code&gt;&amp;nbsp;part instructs the compiler to generate the default implementation for the function. Defaulted functions have two advantages: They are more efficient than manual implementations, and they rid the programmer from the chore of defining those functions manually.&lt;/div&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The opposite of a defaulted function is a&amp;nbsp;&lt;em&gt;deleted function&lt;/em&gt;:&lt;/div&gt;&lt;pre&gt;int func()=delete;&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Deleted functions are useful for preventing object copying, among the rest. Recall that C++ automatically declares a copy constructor and an assignment operator for classes. To disable copying, declare these two special member functions&amp;nbsp;&lt;code&gt;=delete&lt;/code&gt;:&lt;/div&gt;&lt;pre&gt;struct NoCopy
{
    NoCopy &amp;amp; operator =( const NoCopy &amp;amp; ) = delete;
    NoCopy ( const NoCopy &amp;amp; ) = delete;
};
NoCopy a;
NoCopy b(a); //compilation error, copy ctor is deleted&lt;/pre&gt;&lt;h3 class=&quot;color-programming&quot; style=&quot;color: #a8be0e; font-family: Georgia, Times, serif; font-size: 20px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 10px; text-decoration: none;&quot;&gt;nullptr&lt;/h3&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;At last, C++ has a keyword that designates a null pointer constant.&amp;nbsp;&lt;code&gt;nullptr&lt;/code&gt;&amp;nbsp;replaces the bug-prone&amp;nbsp;&lt;code&gt;NULL&lt;/code&gt;&amp;nbsp;macro and the literal 0 that have been used as null pointer substitutes for many years.&lt;code&gt;nullptr&lt;/code&gt;&amp;nbsp;is strongly-typed:&lt;/div&gt;&lt;pre&gt;void f(int); //#1
void f(char *);//#2
//C++03
f(0); //which f is called?
//C++11
f(nullptr) //unambiguous, calls #2&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;code&gt;nullptr&lt;/code&gt;&amp;nbsp;is applicable to all pointer categories, including function pointers and pointers to members:&lt;/div&gt;&lt;pre&gt;const char *pc=str.c_str(); //data pointers
if (pc!=nullptr)
  cout&amp;lt;&lt;pc&lt;&lt;endl; (*pmf)()=&quot;nullptr;&quot; (a::*pmf)()=&quot;nullptr;&quot; function&lt;=&quot;&quot; function=&quot;&quot; int=&quot;&quot; member=&quot;&quot; pointer=&quot;&quot; pre=&quot;&quot; to=&quot;&quot; void=&quot;&quot;&gt;&lt;h3 class=&quot;color-programming&quot; style=&quot;color: #a8be0e; font-family: Georgia, Times, serif; font-size: 20px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 10px; text-decoration: none;&quot;&gt;Delegating Constructors&lt;/h3&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;In C++11 a constructor may call another constructor of the same class:&lt;/div&gt;&lt;pre&gt;class M //C++11 delegating constructors
{
 int x, y;
 char *p;
public:
 M(int v) : x(v), y(0),  p(new char [MAX])  {} //#1 target
 M(): M(0) {cout&amp;lt;&amp;lt;&quot;delegating ctor&quot;&amp;lt;&lt;endl;} #2=&quot;&quot; delegating=&quot;&quot; pre=&quot;&quot; };&lt;=&quot;&quot;&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Constructor #2, the delegating constructor, invokes the&amp;nbsp;&lt;em&gt;target constructor&lt;/em&gt;&amp;nbsp;#1.&lt;/div&gt;&lt;h3 class=&quot;color-programming&quot; style=&quot;color: #a8be0e; font-family: Georgia, Times, serif; font-size: 20px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 10px; text-decoration: none;&quot;&gt;Rvalue References&lt;/h3&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Reference types in C++03 can only bind to&amp;nbsp;&lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/macxhelp/v6v81/index.jsp?topic=/com.ibm.vacpp6m.doc/language/ref/clrc05lvalue.htm&quot; style=&quot;color: #0d5674; font-family: Georgia, Times, serif; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;lvalues&lt;/a&gt;. C++11 introduces a new category of reference types called&amp;nbsp;&lt;em&gt;rvalue references&lt;/em&gt;. Rvalue references can bind to rvalues, e.g.&amp;nbsp;&lt;a href=&quot;http://www.informit.com/guides/content.aspx?g=cplusplus&amp;amp;seqNum=198&quot; style=&quot;color: #0d5674; font-family: Georgia, Times, serif; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;temporary objects&lt;/a&gt;&amp;nbsp;and literals.&lt;/div&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The primary reason for adding rvalue references is&amp;nbsp;&lt;em&gt;move semantics&lt;/em&gt;. Unlike traditional copying, moving means that a target object&amp;nbsp;&lt;em&gt;pilfers&lt;/em&gt;&amp;nbsp;the resources of the source object, leaving the source in an “empty” state. In certain cases where making a copy of an object is both expensive and unnecessary, a move operation can be used instead. To appreciate the performance gains of move semantics, consider string swapping. A naive implementation would look like this:&lt;/div&gt;&lt;pre&gt;void naiveswap(string &amp;amp;a, string &amp;amp; b)
{
 string temp = a;
 a=b;
 b=temp;
}&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;This is expensive. Copying a string entails the allocation of raw memory and copying the characters from the source to the target. In contrast, moving strings merely swaps two data members, without allocating memory, copying char arrays and deleting memory:&lt;/div&gt;&lt;pre&gt;void moveswapstr(string&amp;amp; empty, string &amp;amp; filled)
{
//pseudo code, but you get the idea
 size_t sz=empty.size();
 const char *p= empty.data();
//move filled&#39;s resources to empty
 empty.setsize(filled.size());
 empty.setdata(filled.data());
//filled becomes empty
 filled.setsize(sz);
 filled.setdata(p);
}&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;If you’re implementing a class that supports moving, you can declare a move constructor and a move assignment operator like this:&lt;/div&gt;&lt;pre&gt;class Movable
{
Movable (Movable&amp;amp;&amp;amp;); //move constructor
Movable&amp;amp;&amp;amp; operator=(Movable&amp;amp;&amp;amp;); //move assignment operator
};&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The C++11 Standard Library uses move semantics extensively. Many algorithms and containers are now move-optimized.&lt;/div&gt;&lt;h3 class=&quot;color-programming&quot; style=&quot;color: #a8be0e; font-family: Georgia, Times, serif; font-size: 20px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 10px; text-decoration: none;&quot;&gt;C++11 Standard Library&lt;/h3&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;C++ underwent a major facelift in 2003 in the form of the&amp;nbsp;&lt;a href=&quot;http://www.devsource.com/c/a/Languages/Grok-The-New-Features-in-Standard-C/&quot; style=&quot;color: #0d5674; font-family: Georgia, Times, serif; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Library Technical Report 1&lt;/a&gt;&amp;nbsp;(TR1). TR1 included new container classes (&lt;code&gt;unordered_set&lt;/code&gt;,&amp;nbsp;&lt;code&gt;unordered_map&lt;/code&gt;,&amp;nbsp;&lt;code&gt;unordered_multiset&lt;/code&gt;, and&amp;nbsp;&lt;code&gt;unordered_multimap&lt;/code&gt;) and several new libraries for regular expressions, tuples, function object wrapper and more. With the approval of C++11, TR1 is officially incorporated into standard C++ standard, along with new libraries that have been added since TR1. Here are some of the C++11 Standard Library features:&lt;/div&gt;&lt;h4 class=&quot;color-programming&quot; style=&quot;border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #333333; font-family: Georgia, Times, serif; font-size: 11px; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 10px; padding-right: 5px; padding-top: 5px; text-decoration: none; text-transform: uppercase;&quot;&gt;THREADING LIBRARY&lt;/h4&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Unquestionably, the most important addition to C++11 from a programmer’s perspective is concurrency. C++11 has a thread class that represents an execution thread,&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Futures_and_promises&quot; style=&quot;color: #0d5674; font-family: Georgia, Times, serif; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;promises and futures&lt;/a&gt;, which are objects that are used for synchronization in a concurrent environment, the&lt;a href=&quot;http://www.stdthread.co.uk/doc/headers/future/async.html&quot; style=&quot;color: #0d5674; font-family: Georgia, Times, serif; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;async()&lt;/a&gt;&amp;nbsp;function template for launching concurrent tasks, and the&amp;nbsp;&lt;a href=&quot;http://www.devx.com/cplus/10MinuteSolution/37436&quot; style=&quot;color: #0d5674; font-family: Georgia, Times, serif; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;thread_local&lt;/a&gt;&amp;nbsp;storage type for declaring thread-unique data. For a quick tour of the C++11 threading library, read Anthony Williams’&amp;nbsp;&lt;a href=&quot;http://www.devx.com/SpecialReports/Article/38883&quot; style=&quot;color: #0d5674; font-family: Georgia, Times, serif; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Simpler Multithreading in C++0x&lt;/a&gt;.&lt;/div&gt;&lt;h4 class=&quot;color-programming&quot; style=&quot;border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #333333; font-family: Georgia, Times, serif; font-size: 11px; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 10px; padding-right: 5px; padding-top: 5px; text-decoration: none; text-transform: uppercase;&quot;&gt;NEW SMART POINTER CLASSES&lt;/h4&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;C++98 defined only one smart pointer class,&amp;nbsp;&lt;code&gt;auto_ptr&lt;/code&gt;, which is now deprecated. C++11 includes new smart pointer classes:&amp;nbsp;&lt;a href=&quot;http://www.informit.com/guides/content.aspx?g=cplusplus&amp;amp;seqNum=239&quot; style=&quot;color: #0d5674; font-family: Georgia, Times, serif; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;shared_ptr&lt;/a&gt;&amp;nbsp;and the recently-added&amp;nbsp;&lt;a href=&quot;http://www.informit.com/guides/content.aspx?g=cplusplus&amp;amp;seqNum=400&quot; style=&quot;color: #0d5674; font-family: Georgia, Times, serif; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;unique_ptr&lt;/a&gt;. Both are compatible with other Standard Library components, so you can safely store these smart pointers in standard containers and manipulate them with standard algorithms.&lt;/div&gt;&lt;h4 class=&quot;color-programming&quot; style=&quot;border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #333333; font-family: Georgia, Times, serif; font-size: 11px; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 10px; padding-right: 5px; padding-top: 5px; text-decoration: none; text-transform: uppercase;&quot;&gt;NEW ALGORITHMS&lt;/h4&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The C++11 Standard Library defines new algorithms that mimic the set theory operations&lt;code&gt;all_of()&lt;/code&gt;,&amp;nbsp;&lt;code&gt;any_of()&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;none_of()&lt;/code&gt;. The following listing applies the predicate&lt;code&gt;ispositive()&lt;/code&gt;&amp;nbsp;to the range&amp;nbsp;&lt;code&gt;[first, first+n)&lt;/code&gt;&amp;nbsp;and uses&amp;nbsp;&lt;code&gt;all_of()&lt;/code&gt;,&amp;nbsp;&lt;code&gt;any_of()&lt;/code&gt;&amp;nbsp;and&lt;code&gt;none_of()&lt;/code&gt;&amp;nbsp;to examine the range&#39;s properties:&lt;/div&gt;&lt;pre&gt;#include &lt;algorithm&gt;
//C++11 code
//are all of the elements positive?
all_of(first, first+n, ispositive()); //false
//is there at least one positive element?
any_of(first, first+n, ispositive());//true
// are none of the elements positive?
none_of(first, first+n, ispositive()); //false&lt;/algorithm&gt;&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;A new category of&amp;nbsp;&lt;code&gt;copy_n&lt;/code&gt;&amp;nbsp;algorithms is also available. Using&amp;nbsp;&lt;code&gt;copy_n()&lt;/code&gt;, copying an array of 5 elements to another array is a cinch:&lt;/div&gt;&lt;pre&gt;#include
int source[5]={0,12,34,50,80};
int target[5];
//copy 5 elements from source to target
copy_n(source,5,target);&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The algorithm&amp;nbsp;&lt;code&gt;iota()&lt;/code&gt;&amp;nbsp;creates a range of sequentially increasing values, as if by assigning an initial value to&amp;nbsp;&lt;code&gt;*first&lt;/code&gt;, then incrementing that value using prefix ++. In the following listing,&lt;code&gt;iota()&lt;/code&gt;&amp;nbsp;assigns the consecutive values {10,11,12,13,14} to the array&amp;nbsp;&lt;code&gt;arr&lt;/code&gt;, and {&#39;a&#39;, &#39;b&#39;, &#39;c&#39;} to the char array&amp;nbsp;&lt;code&gt;c&lt;/code&gt;.&lt;/div&gt;&lt;pre&gt;include &lt;numeric&gt;
int a[5]={0};
char c[3]={0};
iota(a, a+5, 10); //changes a to {10,11,12,13,14}
iota(c, c+3, &#39;a&#39;); //{&#39;a&#39;,&#39;b&#39;,&#39;c&#39;}&lt;/numeric&gt;&lt;/pre&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;C++11 still lacks a few useful libraries such as an XML API, sockets, GUI, reflection — and yes, a proper automated garbage collector. However, it does offer plenty of new features that will make C++ more secure, efficient (yes, even more efficient than it has been thus far! See Google&#39;s&lt;a href=&quot;http://www.itproportal.com/2011/06/07/googles-rates-c-most-complex-highest-performing-language/&quot; style=&quot;color: #0d5674; font-family: Georgia, Times, serif; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;benchmark tests&lt;/a&gt;), and easier to learn and use.&lt;/div&gt;&lt;div style=&quot;padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;If the changes in C++11 seem overwhelming, don&#39;t be alarmed. Take the time to digest these changes gradually. At the end of this process you will probably agree with Stroustrup: C++11&amp;nbsp;&lt;em&gt;does&lt;/em&gt;feel like a new language — a much better one.&lt;/div&gt;&lt;/endl;}&gt;&lt;/pre&gt;&lt;/pc&lt;&lt;endl;&gt;&lt;/pre&gt;&lt;/endl;&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/5486211532289061433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/5486211532289061433' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/5486211532289061433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/5486211532289061433'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/08/biggest-changes-in-c11.html' title='The Biggest Changes in C++11'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-1327519406236001299</id><published>2011-08-14T11:53:00.000-07:00</published><updated>2011-08-14T11:53:52.000-07:00</updated><title type='text'>Bitwise operators in c#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;h1 class=&quot;post-title entry-title&quot;&gt; Bitwise operators in c# OR(|), XOR(^), AND(&amp;amp;amp;), NOT(~)&lt;br /&gt;
&lt;/h1&gt;&lt;div class=&quot;post-header&quot;&gt;&lt;div class=&quot;post-header-line-1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-2982046587300055863&quot;&gt;This post is a brush up on some of the bitwise operators that we shall be using for creating bitmasks to set permissions(my next&amp;nbsp;post will be on exactly this subject. Bitmasks).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The c# bitwise operators I shall be covering here and are of particular interest to me in my followup post are :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;binary OR(|) operator&lt;/li&gt;
&lt;li&gt;binary AND(&amp;amp;) operator&lt;/li&gt;
&lt;li&gt;XOR (^) operator&lt;/li&gt;
&lt;li&gt;Not (~) operator&lt;/li&gt;
&lt;/ol&gt;&lt;h1&gt;Binary OR(|) operator&lt;/h1&gt;&lt;blockquote&gt;Binary | operators are predefined for the integral types and bool. For integral types, | computes the bitwise OR of its operands. For bool operands, | computes the logical OR of its operands; that is, the result is false if and only if both its operands are false.&lt;/blockquote&gt;Lets focus on the integral types(types that can be represented as numbers) and how the computation takes place. &lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;pre&gt;&lt;div&gt;&lt;span style=&quot;color: blue;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; Page_Load(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; sender, EventArgs e)
{

&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;     byte&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; a &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;7&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;
&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;     byte&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; b &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;
&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;     int&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; orComputed &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; a &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; b;

&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;     &lt;/span&gt;Response.Write(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;.Format(&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;        &quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;lt;br /&amp;gt;{0} | {1} OR computed :{2}&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;    &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;    &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;     &lt;/span&gt;a, b, orComputed));
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;/span&gt;

&lt;span style=&quot;color: black;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Output : &lt;br /&gt;
&lt;br /&gt;
7 | 9 Result :15&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To understand what just happened we need to look at bits and how each bit(which contains an integral type) is understood by the computer. The computer is going to understand this as binary data in the form of 0&#39;s and 1&#39;s eg. --&amp;gt;&amp;gt; 00101010(which represents the number 42), this is actaully much easier for a computer to handle since each bit(or integral type as in number), can be interpreted as either on or off signal. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0 = off&lt;br /&gt;
&lt;br /&gt;
1 = on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To understand the bitwise operator with clarity and how it computes the result, lets first construct a base 2 table from right to left incrementing the exponent by 1 for each power. So, since we have 8 bits in a byte, we make a table that lists 8 elements 128, 64, 32, 16, 8, 4, 2, 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; style=&quot;width: 400px;&quot; unselectable=&quot;on&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;49&quot;&gt;128&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;46&quot;&gt;64&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;32&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;16&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;8&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;4&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;2&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;41&quot;&gt;Result&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;49&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;46&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;41&quot;&gt;1&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;49&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;46&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;41&quot;&gt;2&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;49&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;46&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;41&quot;&gt;4&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;49&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;46&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;41&quot;&gt;8&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;49&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;46&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;41&quot;&gt;16&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;49&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;46&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;41&quot;&gt;32&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;49&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;46&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;41&quot;&gt;64&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;49&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;46&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;46&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;46&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;44&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;46&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;45&quot;&gt;128&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
If you will look at the above pattern more closely, we notice how the 1 keeps moving 1 digit to the left for every new value in binary. This is also known as a &quot;bit shift&quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ok, now that we have our binary 8bit table with digits to the power of 2^ up to 128, so for a simple 7 | 9, which yielded the result 15, lets look at how it was computed by first creating the binary representation using our base 2 table and then computing the binary | operation, so : &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; style=&quot;width: 399px;&quot; unselectable=&quot;on&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;41&quot;&gt;128&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;38&quot;&gt;64&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;38&quot;&gt;32&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;38&quot;&gt;16&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;8&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;4&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;2&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;66&quot;&gt;Calculation&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;32&quot;&gt;Result&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;42&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;38&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;38&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;38&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;35&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;35&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;35&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;35&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;70&quot;&gt;(4+2+1)&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;32&quot;&gt;7&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;40&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;38&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;38&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;38&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;35&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;35&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;35&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;35&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;72&quot;&gt;(8+1)&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;32&quot;&gt;9&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;40&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;38&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;38&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;38&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;74&quot;&gt;(8+4+2+1)&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;15&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the above, binary (|) is being performed on each pair of corresponding bits. If a 1 is present in the either bit or in both bits, otherwise it&#39;s 0. Not clear ? Lets try that again. How did we get the result 1111 ? It&#39;s a simple comparision. If either bit stacked ontop of one another are 1 or both are 1, then the result is 1, otherwise the result is 0. So 1 on 1 = 1, 1 on 0 = 1 but 0 on 0 = 0. &lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;Binary AND(&amp;amp;) operator&lt;/h1&gt;Quoting MSDN Docs :&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Binary &amp;amp; operators are predefined for the integral types and bool. For integral types, &amp;amp; computes the logical bitwise AND of its operands. For bool operands, &amp;amp; computes the logical AND of its operands; that is, the result is true if and only if both its operands are true. &lt;/blockquote&gt;So, lets quickly test this : &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;pre&gt;&lt;div&gt;&lt;span style=&quot;color: blue;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; Page_Load(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; sender, EventArgs e)
{
&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;     byte&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; a &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;7&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;
&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;     byte&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; b &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;

&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;     int&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; orComputed &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; a &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; b;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;     &lt;/span&gt;Response.Write(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;.Format(&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;            &quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;lt;br /&amp;gt;{0} &amp;amp; {1} Result :{2}&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;

&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;    &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;    &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;          &lt;/span&gt;a, b, orComputed));
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;}
&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Output is : &lt;br /&gt;
&lt;br /&gt;
7 &amp;amp; 9 Result :1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lets convert to binary using our base 2 table, and dig deeper&amp;nbsp; :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; style=&quot;width: 397px;&quot; unselectable=&quot;on&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;41&quot;&gt;128&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;40&quot;&gt;64&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;40&quot;&gt;32&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;40&quot;&gt;16&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;8&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;4&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;2&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;52&quot;&gt;Calculation&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;34&quot;&gt;Result&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;41&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;56&quot;&gt;(4+2+1)&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;34&quot;&gt;7&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;58&quot;&gt;(8+1)&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;34&quot;&gt;9&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;42&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;38&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;38&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;60&quot;&gt;(1)&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;1&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
so, how did we get the binary result 0001(1) ?&amp;nbsp; binary (&amp;amp;) is being performed on each pair of corresponding bits. The comparision is made based on both bits stacked ontop of one another. if both are one&#39;s, then we have a 1, anything else is a 0. so 1 on 1 = 1, 1 on 0 = 0, 0 on 0 = 0.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 32px; font-weight: bold;&quot;&gt;Binary Xor&amp;nbsp;(^) operator&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Quoting MSDN Docs:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Binary ^ operators are predefined for the integral types and bool. For integral types, ^ computes the bitwise exclusive-OR of its operands. For bool operands, ^ computes the logical exclusive-or of its operands; that is, the result is true if and only if exactly one of its operands is true.&lt;/blockquote&gt;A simple c# example :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;pre&gt;&lt;div&gt;&lt;span style=&quot;color: blue;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; Page_Load(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; sender, EventArgs e)
{

&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;     sbyte&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; a &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;7&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;
&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;     sbyte&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; b &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;
&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;     int&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; orComputed &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;b;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;on a negative&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;     &lt;/span&gt;Response.Write(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;.Format(&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;              &quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;lt;br /&amp;gt;{0} ^ {1} Result :{2}&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;    &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;    &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;       &lt;/span&gt;a,b, orComputed.ToString()));
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;/span&gt;

&lt;span style=&quot;color: black;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;output : &lt;br /&gt;
&lt;br /&gt;
7 ^ 9 Result :14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, how did binary (^) Xor&#39;ing 7 ^ 9 produce 14 ? This is because binary (^) is being performed on each pair of corresponding bits. If we have two matching zero&#39;s or one&#39;s, then the result is 0, otherwise 1. SO, 1 on 1 = 0, 0 on 0 = 0, 1 on 0 = 1, 0 on 1 = 1. Lets look at an example in our base 2 table of 7 and 9 in binary format : &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; style=&quot;width: 397px;&quot; unselectable=&quot;on&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;41&quot;&gt;128&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;40&quot;&gt;64&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;40&quot;&gt;32&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;40&quot;&gt;16&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;8&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;4&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;2&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;52&quot;&gt;Calculation&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;34&quot;&gt;Result&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;41&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;56&quot;&gt;(4+2+1)&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;34&quot;&gt;7&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;43&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;58&quot;&gt;(8+1)&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;34&quot;&gt;9&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;42&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;38&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;38&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;39&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;60&quot;&gt;(8+4+2)&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;37&quot;&gt;14&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;h1&gt;Not (~) operator&lt;/h1&gt;Quoting MSDN Docs:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;The ~ operator performs a bitwise complement operation on its operand, which has the effect of reversing each bit. Bitwise complement operators are predefined for int, uint, long, and ulong.&lt;/blockquote&gt;This is also a unary operator so we don&#39;t need to pass a value. Unary operators perform an operation on a single operand eg. ~n and not x~y.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Binary (~) operator is the most confusing one. It performs reversing of each bit, so reversing a positive can produce a negative value. Negative Values Use Two&#39;s Complement format and is quite tricky.&lt;/blockquote&gt;A simple example :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;pre&gt;&lt;div&gt;&lt;span style=&quot;color: blue;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; Page_Load(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; sender, EventArgs e)
{

&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;     sbyte&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; a &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;7&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;
&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;     int&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; orComputed1 &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;~-&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;a;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;on a negative&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;     int&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; orComputed2 &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;~&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;a;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt; on a positive&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;     &lt;/span&gt;Response.Write(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;.Format(&lt;/span&gt;

&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;                &quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;lt;br /&amp;gt;~-{0} Result :{1}&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;    &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;    &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;    &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;     &lt;/span&gt;a, orComputed1));
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;     &lt;/span&gt;Response.Write(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;.Format(&lt;/span&gt;

&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;             &quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;lt;br /&amp;gt;~+{0} Result :{1}&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;    &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;    &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;    &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;     &lt;/span&gt;a, orComputed2));
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;

&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;output : &lt;br /&gt;
&lt;br /&gt;
~-7 Result :6&lt;br /&gt;
&lt;br /&gt;
~+7 Result :-8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, when the NOT(~) operator is applied to a positive number, the resulting value is a negative. This is because the value is reversed. Since this reversing yields a negative or positive depending on what value your reversing, use a signed type (a type that can store a negative value). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the base table below, our binary number gets inverted. all 1&#39;s become 0 and 0 becomes 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A signed binary uses the left most bit to keep track of the sign(negative or positive). &lt;br /&gt;
&lt;br /&gt;
In the c# compiler, negative values are represented internally in two&#39;s complement format. Two&#39;s complement can be obtained by negating each bit of the value, then adding 1. Performing two&#39;s complement twice generates the original value. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following base 2 table, one typical gotcha when inverting is to remember to start the inversion from the left of the first 1 value in our binary. So, say had we a binary representation of the digit 7(00000111), then we start inverting at the 2nd digit starting at the right, skipping the first(since it&#39;s 1)&amp;nbsp; and get 11111001. A last thing to also note is how in our calculation we added a negative -1 to our result instead of a positive 1 --&amp;gt;&amp;gt; (-128+64+32+16+8+1)-1 ; While the two&#39;s complement format states that we need add 1, we are actually deducting 1 versus adding 1. This is because we have to consider 0 in the equation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An easy method to get the two&#39;s complement of +7 :(left most is used to track sign, so add -1 to the result) :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; unselectable=&quot;on&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;42&quot;&gt;128&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;35&quot;&gt;64&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;32&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;35&quot;&gt;16&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;28&quot;&gt;8&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;28&quot;&gt;4&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;28&quot;&gt;2&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;28&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;151&quot;&gt;Calculation&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;58&quot;&gt;Result&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;42&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;0&lt;/span&gt;&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;35&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;35&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;28&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;28&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;28&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;28&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;151&quot;&gt;(4+2+1)&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;58&quot;&gt;7&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;42&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;1&lt;/span&gt;&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;36&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;35&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;29&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;29&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;29&quot;&gt;0&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;30&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;(-128+64+32+16+8+1)&lt;span style=&quot;color: red;&quot;&gt;-1&lt;/span&gt;&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;60&quot;&gt;-8&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
Note the left most significant pair of corresponding bits in red. A value of 0 means positive and a value of 1 means negative and is used for tracking the sign in a signed binary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One question still remains, why is the two&#39;s complement always a positive less(6) and a negative more(-8) ? &lt;br /&gt;
&lt;br /&gt;
Why aren&#39;t we getting -7 for a 7 and vice versa. I guess the answer to this is simply &quot;logic&quot;, we have to consider the 0. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; style=&quot;width: 400px;&quot; unselectable=&quot;on&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;50&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;-8&lt;/span&gt;&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;50&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;-7&lt;/span&gt;&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;50&quot;&gt;-6&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;50&quot;&gt;-5&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;50&quot;&gt;-4&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;50&quot;&gt;-3&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;50&quot;&gt;-2&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;50&quot;&gt;-1&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td valign=&quot;top&quot; width=&quot;50&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;7&lt;/span&gt;&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;50&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;6&lt;/span&gt;&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;50&quot;&gt;5&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;50&quot;&gt;4&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;50&quot;&gt;3&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;50&quot;&gt;2&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;50&quot;&gt;1&lt;/td&gt;    &lt;td valign=&quot;top&quot; width=&quot;50&quot;&gt;0&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/1327519406236001299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/1327519406236001299' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/1327519406236001299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/1327519406236001299'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/08/bitwise-operators-in-c.html' title='Bitwise operators in c#'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-7682127647563989013</id><published>2011-08-08T05:40:00.000-07:00</published><updated>2011-08-08T05:40:55.681-07:00</updated><title type='text'>Removing Unused Css form classes from your web application</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
Most of you might have seen that while working on a Website project,  the CSS gets harder to maintain as the site ages. This might be due to  new developers coming in to the project, removal of UI elements (but not  the corresponding CSS), refactoring and so on. I think it is a good  idea to revisit and clean your css every few weeks before it becomes  totally unmanageable. In this post, i am going to outline 2 ways to do  so    &lt;br /&gt;
There is a great Firefox plugin called &lt;a href=&quot;http://www.sitepoint.com/dustmeselectors/&quot; target=&quot;_blank&quot;&gt;Dust-Me Selectors&lt;/a&gt;  which can test individual web pages or spider your Website to find  unused CSS selectors. As you navigate from page to page in your Website,  it maintains a list of unused CSS selectors that you can remove.     &lt;br /&gt;
If  for some reason you cannot use the plugin, or would like to be more  sure, I have also created a small utility (for personal use) that can  parse a CSS file to create a list of defined classes and go through the  code base to determine which of those classes are actually being used.  This utility usually gives me a list of unused CSS classes with an  accuracy of greater than 95%. It cannot give a 100% accurate output in  cases where the css classes are being assigned dynamically in JavaScript  or server side code (it catches some of them, but not all). But it  gives you a great starting point. I normally search my codebase for the  CSS class name before commenting it out from the CSS file to be sure its  not being used in the code anywhere. I delete the commented out CSS  classes after a couple of releases if I do not see any issues.     &lt;br /&gt;
You can download the utility (named CssCleaner) from &lt;a href=&quot;http://www.dotnetsurfers.com/utils/csscleaner.zip&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.  Please remember that this does not come with any kind of warranty, I am  just sharing this so that it can be helpful to somebody in a situation  similar to mine.     &lt;br /&gt;
CssCleaner is pretty simple to use. Download  the app, unzip it to a folder on your system. You should see 2 files –  CssCleaner.exe and CssCleaner.exe.config. The config file is needed by  the application and is present to make a couple of things configurable.  I’ll talk more about it in a second.&lt;br /&gt;
&lt;img src=&quot;http://www.dotnetsurfers.com/blog/images/csshelper.gif&quot; /&gt;     &lt;br /&gt;
After  you run the application, click on &quot;Choose Application Folder&quot; and  choose the code base folder for your Website. Click on &quot;Choose CSS File&quot;  and select the CSS file that you want to analyze. Change the File  Filter if you would like to process files different from the default  types. Leaving that textbox blank processes all files. Click on  &quot;Process&quot; to run the utility. The unused classes get loaded on the right  hand side. In my use, the tool has been pretty fast.     &lt;br /&gt;
If anybody is interested in the implementation, i use a parser/scanner to parse the CSS file similar to &lt;a href=&quot;http://www.codeproject.com/KB/recipes/CSSParser.aspx&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt;.  Then I go through all the files in the code base, building a list of&amp;nbsp;  used CSS classes using a regular expression. The regular expression is  picked up from the config file, so you can tweak it as you find  suitable. The other thing picked up from the config file is the list of  default file types to search for. It then compares the used CSS class  list against the available CSS classes and displays the unused classes  list.     &lt;br /&gt;
If you have any suggestions for the tool, or find any  bugs, please leave a comment or email me (latish.sehgal at gmail dot  com) and I’ll try my best to implement it. I hope that you find this  tool helpful.&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/7682127647563989013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/7682127647563989013' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/7682127647563989013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/7682127647563989013'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/08/removing-unused-css-form-classes-from.html' title='Removing Unused Css form classes from your web application'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-110868818046068060</id><published>2011-08-08T05:38:00.000-07:00</published><updated>2011-08-08T05:38:02.859-07:00</updated><title type='text'>Dot NET Developers Tools List  and More</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
I gave a brownbag presentation at my current client recently about  the common tools (in addition to Visual Studio), that I use on a regular  basis for working with .NET or web development in general. I also threw  in some non-development tools that are a part of my day to day life and  make things easier. Here’s the complete list:&lt;br /&gt;
Note: For a completely awesome and Ultimate Developer’s tool list, be sure to check out &lt;a href=&quot;http://www.hanselman.com/tools&quot; target=&quot;_blank&quot;&gt;Scott’s blog post&lt;/a&gt;.&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 649px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;91&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;td width=&quot;327&quot;&gt; &lt;div align=&quot;center&quot;&gt;&lt;strong&gt;&lt;u&gt;.NET&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width=&quot;229&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;93&quot;&gt; &lt;div align=&quot;center&quot;&gt;&lt;strong&gt;Name&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width=&quot;326&quot;&gt; &lt;div align=&quot;center&quot;&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width=&quot;228&quot;&gt; &lt;div align=&quot;center&quot;&gt;&lt;strong&gt;Comments&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;94&quot;&gt; &lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?FamilyId=A362781C-3870-43BE-8926-862B40AA0CD0&amp;amp;displaylang=en&quot;&gt;ClrProfiler&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;325&quot;&gt; The CLR Profiler includes a number of very useful views of the  allocation profile, including a histogram of allocated types, allocation  and call graphs, a time line showing GCs of various generations and the  resulting state of the managed heap after those collections, and a call  tree showing per-method allocations and assembly loads.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;228&quot;&gt; &lt;a href=&quot;http://odetocode.com/Blogs/scott/archive/2005/12/11/2611.aspx&quot;&gt;Working with Cassini&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;95&quot;&gt; &lt;a href=&quot;http://www.microsoft.com/DOWNLOADS/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&amp;amp;displaylang=en&quot;&gt;DebugDiag&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;324&quot;&gt; The Debug Diagnostic Tool (DebugDiag) is designed to assist in  troubleshooting issues such as hangs, slow performance, memory leaks or  fragmentation, and crashes in any Win32 user-mode process. The tool  includes additional debugging scripts focused on Internet Information  Services (IIS) applications, web data access components, COM+ and  related Microsoft technologies.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;227&quot;&gt; &lt;a href=&quot;http://blogs.msdn.com/tess/archive/2009/05/12/debug-diag-script-for-troubleshooting-net-2-0-memory-leaks.aspx&quot;&gt;Troubleshooting .Net 2.0 memory leaks.&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;96&quot;&gt; &lt;a href=&quot;http://code.msdn.microsoft.com/codeanalysis/Release/ProjectReleases.aspx?ReleaseId=553&quot;&gt;FxCop&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;324&quot;&gt; FxCop is a code analysis tool that checks .NET managed code  assemblies for conformance to the Microsoft .NET Framework Design  Guidelines.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;227&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;97&quot;&gt; &lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?FamilyID=4B5B7F29-1939-4E5B-A780-70E887964165&amp;amp;displaylang=en&quot;&gt;LibCheck&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;323&quot;&gt; This tool allows you to compare two versions of an assembly, and  determine the differences. The tool reports the differences as a  combination of ‘removed’ and ‘added’ APIs.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;227&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;98&quot;&gt; &lt;a href=&quot;http://www.ndepend.com/&quot;&gt;NDepend&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;322&quot;&gt; NDepend is a tool that simplifies managing a complex .NET code base.  Architects and developers can analyze code structure, specify design  rules, plan massive refactoring, do effective code reviews and master  evolution by comparing different versions of the code.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;227&quot;&gt; Has Academic, commercial versions.&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;99&quot;&gt; &lt;a href=&quot;http://research.microsoft.com/en-us/projects/pex/default.aspx&quot;&gt;PEX&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;322&quot;&gt; Right from the Visual Studio code editor, &lt;strong&gt;Pex&lt;/strong&gt; finds  interesting input-output values of your methods, which you can save as a  small test suite with high code coverage. Pex performs a systematic  analysis, hunting for boundary conditions, exceptions and assertion  failures, which you can debug right away. Pex enables Parameterized Unit  Testing, an extension of Unit Testing that reduces test maintenance  costs.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;226&quot;&gt; &lt;ul&gt;&lt;li&gt;Has Academic, commercial versions. &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.maartenballiauw.be/post/2009/01/07/Verifying-code-and-testing-with-Pex.aspx&quot;&gt;Getting Started&lt;/a&gt;. &lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;100&quot;&gt; &lt;a href=&quot;http://www.red-gate.com/products/reflector/&quot;&gt;Reflector&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;321&quot;&gt; .NET Reflector enables you to easily view, navigate, and search  through, the class hierarchies of .NET assemblies, even if you don’t  have the code for them. With it, you can decompile and analyze .NET  assemblies in C#, Visual Basic, and IL.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;226&quot;&gt; Be sure to check out the &lt;a href=&quot;http://www.codeplex.com/reflectoraddins&quot;&gt;Addins&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;101&quot;&gt; &lt;a href=&quot;http://sourceforge.net/projects/regulator/&quot;&gt;Regulator&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;321&quot;&gt; The Regulator is an advanced Regular expressions testing tool,  featuring syntax highlighting and web-service integration with  Regexlib.com’s database of online regular expressions.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;226&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;102&quot;&gt; &lt;a href=&quot;http://www.jetbrains.com/resharper/&quot;&gt;Resharper&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;320&quot;&gt; ReSharper provides solution-wide error highlighting on the fly,  instant solutions for found errors, over 30 advanced code refactorings,  superior unit testing tools, handy navigation and search features,  single-click code formatting and cleanup, automatic code generation and  templates.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;225&quot;&gt; &lt;ul&gt;&lt;li&gt;Free 30 day trial, Full Edition: $199, C# Edition: $149. &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.devexpress.com/Products/Visual_Studio_Add-in/CodeRushX/&quot;&gt;CodeRush Express&lt;/a&gt; is a similar free alternative, but I prefer Resharper. &lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;103&quot;&gt; &lt;a href=&quot;http://www.microsoft.com/Downloads/details.aspx?FamilyID=e82ea71d-da89-42ee-a715-696e3a4873b2&amp;amp;displaylang=en&quot;&gt;SandCastle&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;319&quot;&gt; Enables managed class library developers to easily create accurate, informative documentation with a common look and feel.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;225&quot;&gt; &lt;a href=&quot;http://www.dotnetsurfers.com/Blog/2009/04/17/CreatingMSDNLikeHelpUsingSandcastle.aspx&quot;&gt;Simple how-to&lt;/a&gt;.&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;103&quot;&gt; &lt;a href=&quot;http://www.binaryfortress.com/aspnet-viewstate-helper/&quot;&gt;ViewState Helper&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;319&quot;&gt; Lets you debug ViewState issues by displaying Page and viewstate details for an asp.net page.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;225&quot;&gt; &lt;a href=&quot;http://www.pluralsight.com/toolcontent/ViewStateDecoder11.zip&quot;&gt;Alternative&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;103&quot;&gt; &lt;a href=&quot;http://projects.nikhilk.net/WebDevHelper/&quot;&gt;Web Development Helper&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;319&quot;&gt; Web Development Helper is a free browser extension for Internet  Explorer that provides a set of tools and utilities for the Web  developer, esp. Ajax and ASP.NET developers. The tool provides features  such as a DOM inspector, an HTTP tracing tool, and script diagnostics  and immediate window.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;225&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;103&quot;&gt; &lt;a href=&quot;http://www.microsoft.com/whdc/devtools/debugging/installx86.Mspx&quot; target=&quot;_blank&quot;&gt;WinDbg&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;319&quot;&gt; Microsoft Windows Debugger (WinDbg) is a powerful Windows-based  debugging tool. It is capable of both user-mode and kernel-mode  debugging.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;226&quot;&gt; &lt;a href=&quot;http://blogs.msdn.com/tess/default.aspx&quot;&gt;Excellent blog to learn more&lt;/a&gt;.&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 648px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;92&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;td width=&quot;329&quot;&gt; &lt;div align=&quot;center&quot;&gt;&lt;strong&gt;&lt;u&gt;Web Development&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width=&quot;225&quot;&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;94&quot;&gt; &lt;strong&gt;Name&lt;/strong&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;327&quot;&gt; &lt;strong&gt;Description&lt;/strong&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;225&quot;&gt; &lt;strong&gt;Comments&lt;/strong&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;96&quot;&gt; &lt;a href=&quot;http://www.dotnetsurfers.com/Blog/2008/10/02/RemovingUnusedCSSClassesFromYourWebApplication.aspx&quot;&gt;CssCleaner&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;326&quot;&gt; Detect unused css classes in your website (static analysis).&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;224&quot;&gt;Written by yours truly &lt;img alt=&quot;:)&quot; class=&quot;wp-smiley&quot; src=&quot;http://dotnetsurfers.com/blog/wp-includes/images/smilies/icon_smile.gif&quot; /&gt; . Need to add more features to this and maybe change the UI to WPF.&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;98&quot;&gt; &lt;a href=&quot;http://www.sprymedia.co.uk/article/Design&quot;&gt;Design&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;325&quot;&gt; Design is a suite of web-design and development assistive tools which  can be utilised on any web-page. Encompassing utilities for grid  layout, measurement and alignment, Design is a uniquely powerful  JavaScript bookmarklet.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;224&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;99&quot;&gt; &lt;a href=&quot;http://www.fiddler2.com/fiddler2/&quot;&gt;Fiddler&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;324&quot;&gt; Fiddler logs all HTTP(S) traffic between your computer and the  Internet and Fiddler allows you to inspect all HTTP(S) traffic, set  breakpoints, and &quot;fiddle&quot; with incoming or outgoing data. Fiddler  includes a powerful event-based scripting subsystem, and can be extended  using any .NET language.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;223&quot;&gt; &lt;ul&gt;&lt;li&gt;Make sure you check out the &lt;a href=&quot;http://www.fiddler2.com/Fiddler2/extensions.asp&quot;&gt;Addons&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.wireshark.org/&quot;&gt;Wireshark&lt;/a&gt; is another alternative. &lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;100&quot;&gt; &lt;a href=&quot;http://getfirebug.com/&quot;&gt;Firebug&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;324&quot;&gt; Firebug integrates with Firefox to put a wealth of web development  tools at your fingertips while you browse. You can edit, debug, and  monitor CSS, HTML, and JavaScript live in any web page.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;223&quot;&gt; &lt;ul&gt;&lt;li&gt;Use &lt;a href=&quot;http://www.microsoft.com/DownLoads/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;amp;displaylang=en&quot;&gt;IE toolbar&lt;/a&gt; or &lt;a href=&quot;http://getfirebug.com/lite.html&quot;&gt;Firebug Lite&lt;/a&gt; for IE. &lt;/li&gt;
&lt;li&gt;Make sure you check out the &lt;a href=&quot;http://getfirebug.com/extensions/index.html&quot;&gt;extensions&lt;/a&gt;. &lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;101&quot;&gt; &lt;a href=&quot;http://www.jslint.com/&quot;&gt;JSLint&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;323&quot;&gt; With JavaScript Lint, you can check all your JavaScript source code  for common mistakes without actually running the script or opening the  web page.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;223&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;102&quot;&gt; &lt;a href=&quot;http://westciv.com/xray/index.html&quot;&gt;XRAY&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;323&quot;&gt; XRAY is a bookmarklet for Internet Explorer 6+, and Webkit and  Mozilla based browsers (including Safari, Firefox, Camino or Mozilla).  Use it to see the box model for any element on any web page.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;222&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;103&quot;&gt; &lt;a href=&quot;http://www.xenocode.com/browsers/&quot;&gt;Xenocode.com&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;322&quot;&gt; Run any browser (IE 6-8, FF 2,3, Opera, Chrome, Safari) directly from the web.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;223&quot;&gt; &lt;ul&gt;&lt;li&gt;This is the best and easiest way I have seen to run multiple  versions of IE on your box, but their service seems to be down lately. &lt;/li&gt;
&lt;li&gt;Other options are to use a virtual machine or a program like &lt;a href=&quot;http://tredosoft.com/Multiple_IE&quot;&gt;Multiple IE&lt;/a&gt;. &lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 649px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;89&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;td width=&quot;328&quot;&gt; &lt;div align=&quot;center&quot;&gt;&lt;strong&gt;&lt;u&gt;SQL Development&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width=&quot;230&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;90&quot;&gt; &lt;strong&gt;Name&lt;/strong&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;327&quot;&gt; &lt;strong&gt;Description&lt;/strong&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;229&quot;&gt; &lt;strong&gt;Comments&lt;/strong&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;91&quot;&gt; &lt;a href=&quot;http://anjlab.com/en/projects/opensource/sqlprofiler&quot;&gt;AnjLab SqlProfiler&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;327&quot;&gt; SQL Server Express Edition Profiler provides the most of  functionality standard profiler does, such as choosing events to  profile, setting filters, etc.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;229&quot;&gt; This is good while working with Sql Server Express, which does not come with a profiler.&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;92&quot;&gt; &lt;a href=&quot;http://roundpolygons.com/SqlAssist/tabid/91/Default.aspx&quot;&gt;SqlAssist&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;326&quot;&gt; Adds Sql Intellisense to Sql Server Management Studio and Visual Studio.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;230&quot;&gt; &lt;ul&gt;&lt;li&gt;Free 30 day trial, pricing &lt;a href=&quot;http://roundpolygons.com/Purchase/tabid/414/Default.aspx&quot;&gt;here&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Sql Server 2008 has inbuilt intellisense. &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.softtreetech.com/isql.htm&quot;&gt;SqlAssistant&lt;/a&gt; is a good alternative for working with multiple database environments. &lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 648px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;94&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;td width=&quot;342&quot;&gt; &lt;div align=&quot;center&quot;&gt;&lt;strong&gt;&lt;u&gt;Generic Useful Tools&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width=&quot;210&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;96&quot;&gt; &lt;strong&gt;Name&lt;/strong&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;341&quot;&gt; &lt;strong&gt;Description&lt;/strong&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;210&quot;&gt; &lt;strong&gt;Comments&lt;/strong&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;98&quot;&gt; &lt;a href=&quot;http://www.autohotkey.com/&quot;&gt;AutoHotKey&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;339&quot;&gt; Automate sending keystrokes and mouse clicks by creating/recording macros.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;209&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;100&quot;&gt; &lt;a href=&quot;http://www.nu2.nu/pebuilder/&quot;&gt;Bart’s Preinstalled Environment (BartPE) bootable windows CD/DVD&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;338&quot;&gt; Bart’s PE Builder helps you build a &quot;BartPE&quot; (Bart Preinstalled  Environment) bootable Windows CD-Rom or DVD from the original Windows XP  or Windows Server 2003 installation/setup CD, very suitable for PC  maintenance tasks.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;208&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;102&quot;&gt; &lt;a href=&quot;http://www.daemon-tools.cc/eng/home&quot;&gt;Daemon Tools&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;337&quot;&gt; To use virtual drives.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;207&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;104&quot;&gt; &lt;a href=&quot;http://www.instapaper.com/&quot;&gt;Instapaper bookmarklet&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;336&quot;&gt; Instapaper allows you to easily save urls for later, when you have  time, so you don’t just forget about them or skim through them.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;207&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;105&quot;&gt; &lt;a href=&quot;http://www.irfanview.com/&quot;&gt;IrfanView&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;335&quot;&gt; IrfanView is a very fast, small, compact graphic viewer.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;206&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;106&quot;&gt; &lt;a href=&quot;http://kdiff3.sourceforge.net/&quot;&gt;KDiff&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;335&quot;&gt; Compare, Merge files and directories.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;206&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;107&quot;&gt; &lt;a href=&quot;http://notepad-plus.sourceforge.net/uk/site.htm&quot;&gt;Notepad++&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;334&quot;&gt; &lt;strong&gt;Notepad++&lt;/strong&gt; is a free source code editor and Notepad replacement that supports several languages.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;206&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;108&quot;&gt; &lt;a href=&quot;http://www.getpaint.net/index.html&quot;&gt;Paint.Net&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;334&quot;&gt; Paint.NET is free image and photo editing software for computers that run Windows.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;205&quot;&gt; I use this instead of MS Paint for simple tasks.&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;109&quot;&gt; &lt;a href=&quot;http://portableapps.com/&quot;&gt;Portable Apps&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;333&quot;&gt; Carry your favorite computer programs along with all of your  bookmarks, settings, email and more with you. Use them on any Windows  computer. All without leaving any personal data behind.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;205&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;110&quot;&gt; &lt;a href=&quot;http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx&quot;&gt;ProcessExplorer&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;333&quot;&gt; &lt;em&gt;Process Explorer&lt;/em&gt; shows you information about which handles and DLLs processes have opened or loaded.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;205&quot;&gt; This has replaced my task manager for the last couple of years.&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;111&quot;&gt; &lt;a href=&quot;http://bayden.com/SlickRun/&quot;&gt;SlickRun&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;332&quot;&gt; SlickRun is a free floating command line utility for Windows.  SlickRun gives you almost instant access to any program or website.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;204&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;112&quot;&gt; &lt;a href=&quot;http://synergy2.sourceforge.net/&quot;&gt;Synergy&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;331&quot;&gt; Synergy lets you easily share a single mouse and keyboard between  multiple computers with different operating systems, each with its own  display, without special hardware. It’s intended for users with multiple  computers on their desk since each system uses its own monitor(s).&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;204&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;113&quot;&gt; &lt;a href=&quot;http://www.videora.com/en-us/Converter/&quot;&gt;Videora Converter&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;331&quot;&gt; Videora Converter is a free video converter that converts video  files, YouTube videos, movies and DVD’s so you can play them on your  video playing device.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;204&quot;&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;114&quot;&gt; &lt;a href=&quot;http://www.videolan.org/vlc/&quot;&gt;VLC media player&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;330&quot;&gt; Multimedia player.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;203&quot;&gt; Plays most video formats out of the box.&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;114&quot;&gt; &lt;a href=&quot;http://www.winamp.com/player&quot;&gt;Winamp music player&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;330&quot;&gt; Mp3 music player.&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;203&quot;&gt; This supports global hotkey bindings, so I can use use my keyboard to change track, volume without bringing it in focus.&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; width=&quot;114&quot;&gt; &lt;a href=&quot;http://www.mesh.com/&quot;&gt;Windows Live Mesh&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td width=&quot;330&quot;&gt; Keep files&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/110868818046068060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/110868818046068060' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/110868818046068060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/110868818046068060'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/08/dot-net-developers-tools-list-and-more.html' title='Dot NET Developers Tools List  and More'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-7063233034369858901</id><published>2011-08-04T00:51:00.000-07:00</published><updated>2011-08-04T00:51:46.280-07:00</updated><title type='text'>Request.Url  - ASP.NET</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Request.Url&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;Full URL :&lt;/i&gt; http://localhost:2000/virtual_dir/myrep/page.aspx?q=qvalue&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;Request.ApplicationPath :&lt;/td&gt;             &lt;td&gt;/virtual_dir&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;Request.CurrentExecutionFilePath :&lt;/td&gt;             &lt;td&gt;/virtual_dir/myrep/page.aspx&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;Request.FilePath :&lt;/td&gt;             &lt;td&gt;/virtual_dir/myrep/page.aspx&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;Request.Path :&lt;/td&gt;             &lt;td&gt;/virtual_dir/myrep/page.aspx&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;Request.PhysicalApplicationPath :&lt;/td&gt;             &lt;td&gt;d:\Inetpub\wwwroot\Websitename\virtual_dir\&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;Request.QueryString :&lt;/td&gt;             &lt;td&gt;/virtual_dir/myrep/page.aspx?q=qvalue&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;Request.Url.AbsolutePath :&lt;/td&gt;             &lt;td&gt;/virtual_dir/myrep/page.aspx&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;Request.Url.AbsoluteUri :&lt;/td&gt;             &lt;td&gt;http://localhost:2000/virtual_dir/myrep/page.aspx?q=qvalue&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;Request.Url.Host :&lt;/td&gt;             &lt;td&gt;localhost&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;Request.Url.Authority :&lt;/td&gt;             &lt;td&gt;localhost:2000&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;Request.Url.LocalPath :&lt;/td&gt;             &lt;td&gt;/virtual_dir/myrep/page.aspx&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;Request.Url.PathAndQuery :&lt;/td&gt;             &lt;td&gt;/virtual_dir/myrep/page.aspx?q=qvalue&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;Request.Url.Port :&lt;/td&gt;             &lt;td&gt;2000&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;Request.Url.Query :&lt;/td&gt;             &lt;td&gt;?q=qvalue&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;Request.Url.Scheme :&lt;/td&gt;             &lt;td&gt;http&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;Request.Url.Segments :&lt;/td&gt;             &lt;td&gt;/&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;&lt;/td&gt;             &lt;td&gt;virtual_dir/&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;&lt;/td&gt;             &lt;td&gt;myrep/&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;             &lt;td class=&quot;label_cem&quot;&gt;&lt;/td&gt;             &lt;td&gt;page.aspx&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/7063233034369858901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/7063233034369858901' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/7063233034369858901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/7063233034369858901'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/08/requesturl-aspnet.html' title='Request.Url  - ASP.NET'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-4619911836511249076</id><published>2011-07-27T06:06:00.000-07:00</published><updated>2011-07-27T06:06:51.334-07:00</updated><title type='text'>Understanding Paths in ASP.NET</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div id=&quot;articleLongDescription&quot;&gt;There are more than 30 methods in  ASP.NET classes that deal with paths and/or URLs. Many developers coming  from traditional ASP tend to stick with the methods they know from ASP  (which are still there), but there are many other useful methods that  can save you a lot of time and headache. Fritz Onion covers the details  of managing paths and URLs in ASP.NET, looking at everything from  virtual to physical path mapping to root path reference syntax.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;A quick scan of the classes in the &lt;tt&gt;System.Web.*&lt;/tt&gt; hierarchy reveals more than 30 methods that deal with paths and/or URLs. In this article, I will cover the more commonly used path and URL functions in ASP.NET—presenting&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;what they do, how they work, and when to use them.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The best way to understand what each of these functions and properties do is&lt;br /&gt;
to try them out and review the results. I have prepared a page that makes calls&lt;br /&gt;
to the most commonly used path functions and properties in ASP.NET, which you&lt;br /&gt;
can download from&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://staff.develop.com/onion/pathsample.zip&quot; target=&quot;new&quot;&gt;http://staff.develop.com/onion/pathsample.zip&lt;/a&gt;.&lt;br /&gt;
I recommend that you download this file, unzip it, and place the contents in a&lt;br /&gt;
virtual directory on a machine with ASP.NET installed. Try to access the&lt;br /&gt;
&lt;tt&gt;pathsample.aspx&lt;/tt&gt; page from a browser, inspect the results, and refer to&lt;br /&gt;
your running page as you read the rest of this article. &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;In case you&#39;re not near a suitably equipped computer to run the page,&lt;br /&gt;
Table 1 shows the results of running the test page. This page was run and&lt;br /&gt;
expressions were all evaluated in the context of a page called&lt;br /&gt;
&lt;tt&gt;client.aspx&lt;/tt&gt;, responding to a request made to the following URL&lt;br /&gt;
http://localhost/informit/subdir/pathsample.aspx/extra.&lt;br /&gt;
The physical directory on the Web server corresponding to this virtual directory&lt;br /&gt;
mapping was &lt;tt&gt;c:\mywebdirs\informit\subdir&lt;/tt&gt;, and the top-level virtual&lt;br /&gt;
directory for this application was called &lt;tt&gt;informit&lt;/tt&gt; and was located at&lt;br /&gt;
&lt;tt&gt;c:\mywebdirs\informit&lt;/tt&gt;.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;Table 1 Path Functions in ASP.NET and Their Results&lt;/h4&gt;&lt;table border=&quot;2&quot; cellpadding=&quot;2&quot; cellspacing=&quot;2&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;228&quot;&gt;&lt;br /&gt;
&lt;b&gt;&lt;span&gt;Expression&lt;/span&gt;&lt;/b&gt;&lt;/td&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;251&quot;&gt;&lt;br /&gt;
&lt;b&gt;&lt;span&gt;Evaluation&lt;/span&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;228&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;this.TemplateSourceDirectory&lt;/tt&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;251&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;/informit/subdir&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;228&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;Request.MapPath(&quot;log.txt&quot;)&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;251&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;c:\mywebdirs\informit\subdir\log.txt&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;228&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;this.MapPathSecure(&quot;log.txt&quot;)&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;251&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;c:\mywebdirs\informit\subdir\log.txt&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;228&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;Request.Path&lt;/tt&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;251&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;/informit/subdir/pathsample.aspx/extra&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;228&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;Request.FilePath&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;251&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;/informit/subdir/pathsample.aspx &lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;  &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;228&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;Request.CurrentExecutionFilePath&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;251&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;/informit/subdir/pathsample.aspx &lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;228&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;Request.PathInfo&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;251&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;/extra&lt;/tt&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;228&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;Request.PhysicalPath&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;251&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;c:\mywebdirs\informit\subdir\pathsample.aspx&lt;br /&gt;
&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;228&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;Request.PhysicalApplicationPath&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt;  &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;251&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;c:\mywebdirs\informit\ &lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;228&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;Request.ApplicationPath&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;251&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;/informit &lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;228&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;Request.Url&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;251&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;http://localhost/informit/subdir/client.aspx/extra&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;228&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;Request.RawUrl&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;251&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;/informit/subdir/pathsample.aspx/extra&lt;/tt&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;228&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;Response.ApplyAppPathModifier(&quot;foo.aspx&quot;)&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;251&quot;&gt;&lt;br /&gt;
&lt;span&gt;&lt;tt&gt;/informit/subdir/foo.aspx&lt;/tt&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;228&quot;&gt;&lt;br /&gt;
&lt;tt&gt;this.ResolveUrl(&quot;~/client.aspx&quot;)&lt;/tt&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt; &lt;td colspan=&quot;1&quot; rowspan=&quot;1&quot; valign=&quot;MIDDLE&quot; width=&quot;251&quot;&gt;&lt;br /&gt;
&lt;tt&gt;/informit/pathsample.aspx&lt;/tt&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;Path Mapping&lt;/h2&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;We start by looking at one of the most commonly used path methods in ASP.NET:&lt;br /&gt;
&lt;tt&gt;MapPath&lt;/tt&gt;. This useful function converts a virtual path into its&lt;br /&gt;
corresponding physical path and is typically used to read or modify physical&lt;br /&gt;
files on the server in the context of a Web request. It is available through the&lt;br /&gt;
&lt;tt&gt;HttpRequest&lt;/tt&gt; object, and for backward compatibility with classic ASP, it&lt;br /&gt;
is also available through the &lt;tt&gt;HttpServerUtility&lt;/tt&gt; object (accessed via&lt;br /&gt;
the &lt;tt&gt;HttpContext&lt;/tt&gt; or &lt;tt&gt;Page &lt;i&gt;Server&lt;/i&gt;&lt;/tt&gt; property). As an example&lt;br /&gt;
of its use, suppose you wanted to write an entry into a log file when a page was&lt;br /&gt;
accessed. Assuming that the log file is named &lt;tt&gt;log.txt&lt;/tt&gt; and is located in&lt;br /&gt;
the same directory as the .aspx page that is accessing it, you could write to&lt;br /&gt;
the file with the following code:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre&gt;// within a method of the Page class
string logfile = Request.MapPath(&quot;log.txt&quot;);
using (StreamWriter sw = File.AppendText(logfile))
{
 sw.WriteLine(&quot;I was here at {0}&quot;, DateTime.Now);
}&lt;/pre&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Notice in Table 1 that the call to &lt;tt&gt;MapPath&lt;/tt&gt; with a string of&lt;br /&gt;
&lt;tt&gt;log.txt&lt;/tt&gt; resulted in the complete path&lt;br /&gt;
&lt;tt&gt;c:\mywebdirs\informit\subdir\log.txt&lt;/tt&gt; corresponding to the physical&lt;br /&gt;
location of the virtual directory accessed in the request. In general, any time&lt;br /&gt;
you call &lt;tt&gt;MapPath&lt;/tt&gt;, it prefixes the string you pass in with the complete&lt;br /&gt;
physical directory path to the current directory to which the request was&lt;br /&gt;
dispatched. This is useful any time you need to access a physical file on disk&lt;br /&gt;
that is placed in the same directory as your page, particularly for things such&lt;br /&gt;
as loading XML files, writing to log files, and performing file&lt;br /&gt;
manipulation.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Be aware that any time you access the file system from within an ASP.NET&lt;br /&gt;
application, you are operating under the restrictive rights associated with the&lt;br /&gt;
ASPNET account (or, in Windows Server 2003, NETWORK SERVICE). This account is&lt;br /&gt;
specially created for ASP.NET on your machine, and by default is granted only&lt;br /&gt;
&lt;i&gt;User&lt;/i&gt; privileges. In a typical installation, this means that you cannot&lt;br /&gt;
modify existing or create new files from within an ASP.NET page. If you find&lt;br /&gt;
yourself wanting to use &lt;tt&gt;MapPath&lt;/tt&gt; to modify or create files, the best&lt;br /&gt;
solution is to grant the ASP.NET account &lt;i&gt;write&lt;/i&gt; and &lt;i&gt;modify&lt;br /&gt;
&lt;/i&gt;privileges to that one subdirectory.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;There is an additional function for performing virtual to physical path&lt;br /&gt;
mapping in ASP.NET called &lt;tt&gt;MapPathSecure&lt;/tt&gt;. This method, also of the&lt;br /&gt;
&lt;tt&gt;HttpRequest&lt;/tt&gt; class, differs only in the fact that it makes a File I/O&lt;br /&gt;
security demand as you request the translation, but it is used internally in&lt;br /&gt;
many of the ASP.NET methods. This demand is not the same as requesting whether&lt;br /&gt;
the account has privileges to write to a file, but rather whether the code that&lt;br /&gt;
is currently being executed has sufficient trust to perform file I/O (done&lt;br /&gt;
through a code access security or CAS check). Most of the time, your ASP.NET&lt;br /&gt;
code will be running with full privileges, so this function will always succeed.&lt;br /&gt;
It is possible, however, in ASP.NET 1.1 to specify a lower trust level at which&lt;br /&gt;
to run your application using the &lt;tt&gt;trust&lt;/tt&gt; element in your configuration&lt;br /&gt;
file (or more likely, for some third-party host environment to run your&lt;br /&gt;
application at a lower level of trust). If this is a possibility for you, then&lt;br /&gt;
it may make sense to call &lt;tt&gt;MapPathSecure&lt;/tt&gt; instead of &lt;tt&gt;MapPath&lt;/tt&gt;, as&lt;br /&gt;
it will trigger a code access security exception sooner rather than later,&lt;br /&gt;
giving your more flexibility in dealing with the failure.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;There are two other potentially useful properties available in the&lt;br /&gt;
&lt;tt&gt;Request&lt;/tt&gt; object: &lt;tt&gt;PhysicalPath&lt;/tt&gt; and&lt;br /&gt;
&lt;tt&gt;PhysicalApplicationPath&lt;/tt&gt;. The former is the complete physical path to&lt;br /&gt;
the endpoint that was requested, and the latter is the complete physical path to&lt;br /&gt;
the root of the application.&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/4619911836511249076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/4619911836511249076' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/4619911836511249076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/4619911836511249076'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/07/understanding-paths-in-aspnet.html' title='Understanding Paths in ASP.NET'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-6445608278067523057</id><published>2011-07-18T22:58:00.001-07:00</published><updated>2011-07-18T22:58:39.687-07:00</updated><title type='text'>How to build your own C# Autodialer</title><content type='html'>&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 24pt;&quot;&gt;How to build your own C# Autodialer&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;center&quot; class=&quot;MsoBodyText&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;Let me start with a short background story. One day, one of my oldest friends (who is a professional business man) came to me (the developer) for advice. He had a specific idea to boost his business: he wanted to install an Autodialer software. He asked for my expert opinion about how this could be done. That time I had a lot of work so I didn&#39;t have the time to come up with something brand new and write him a program. But I really wanted to help him, so in my freetime I was searching for a convenient solution. I&#39;ve found it. We&#39;ve done it. The business is on the wing ever since. My friend gave his approval to publish his story and the method he chose. I&#39;ve thought this could be useful for many people and for many company.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;The key to build an Autodialer, and also to the great success, was a software development kit. It has a sample program to have a look at its facilities. Here&#39;s how you configurate it, after downloading, extracting, and opening it:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;Right click on &lt;b&gt;MainForm.cs&lt;/b&gt; file and select &lt;b&gt;View Code&lt;/b&gt; option (Figure 1). &lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;center&quot; class=&quot;MsoBodyText&quot; style=&quot;margin-left: 35.35pt; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 35.35pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;Search for &lt;b&gt;MainForm_Load&lt;/b&gt; method. You can find the configuration of the autodialer within this method. &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;1.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;///&amp;nbsp;&lt;summary&gt;&amp;nbsp;&amp;nbsp;&lt;/summary&gt;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;2.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;///&amp;nbsp;Occurs&amp;nbsp;when&amp;nbsp;the&amp;nbsp;user&amp;nbsp;loads&amp;nbsp;the&amp;nbsp;form.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;3.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;///&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;4.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;///&amp;nbsp;&lt;param&amp;nbsp;name=&quot;sender&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/param&amp;nbsp;name=&quot;sender&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;5.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;///&amp;nbsp;&lt;param&amp;nbsp;name=&quot;e&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/param&amp;nbsp;name=&quot;e&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;6.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;void&amp;nbsp;MainForm_Load(object&amp;nbsp;sender,&amp;nbsp;EventArgs&amp;nbsp;e)&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;7.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;8.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#region&amp;nbsp;DataBinding&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;9.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;See&amp;nbsp;later&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;10.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#endregion&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;11.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;12.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#region&amp;nbsp;Configuration&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;13.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;14.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autodialer&amp;nbsp;=&amp;nbsp;new&amp;nbsp;Autodialer(GetLocalIP().ToString(),&amp;nbsp;5060,&amp;nbsp;5080,&amp;nbsp;5060,&amp;nbsp;@&quot;..\..\Resources\autodialer-example.wav&quot;);&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;15.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autodialer.ProcessingCompleted&amp;nbsp;+=&amp;nbsp;autodialer_ProcessingCompleted;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;16.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autodialer.PhoneLineStateChanged&amp;nbsp;+=&amp;nbsp;autodialer_PhoneLineStateChanged;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;17.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;18.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;sipAccount&amp;nbsp;=&amp;nbsp;new&amp;nbsp;SIPAccount(true,&amp;nbsp;&quot;oz890&quot;,&amp;nbsp;&quot;oz890&quot;,&amp;nbsp;&quot;oz890&quot;,&amp;nbsp;&quot;oz890&quot;,&amp;nbsp;&quot;192.168.91.212&quot;,&amp;nbsp;5060);&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;19.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autodialer.CreateAndRegisterPhoneLine(sipAccount);&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;20.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#endregion&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;21.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;22.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#region&amp;nbsp;Copyright&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;23.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;//&amp;nbsp;Implementation.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;24.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#endregion&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;25.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;26.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 35.35pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;Parameters for the autodialer:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;1.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;public&amp;nbsp;Autodialer(string&amp;nbsp;localIPAddress,&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;2.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;minPort,&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;3.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;maxPort,&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;4.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;localSIPPort,&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;5.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string&amp;nbsp;wavPath)&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 35.35pt; text-align: justify;&quot;&gt;&lt;b&gt;Parameters:&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;6.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;localIPAddress:&lt;/b&gt; &lt;br /&gt;
This is the local IP address of the computer. If there are more network cards, then you need to enter the IP address of that network card here, with which you connect to the PBX or to the VoIP service provider.&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;7.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;minPort:&lt;/b&gt;&lt;br /&gt;
This is the minimum port that can be used. &lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;8.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;maxPort:&lt;/b&gt; &lt;br /&gt;
This is the maximum port that can be used.&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;9.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;localSIPPort:&lt;/b&gt; &lt;br /&gt;
This is the port reserved for SIP. SIP messages will be listened to via this port.&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;10.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;wavPath:&lt;/b&gt; This is the path for the audio file that will be played during the calls. &lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 35.35pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;The SIP account includes information with which you can register in the PBX or the VoIP service provider successfully.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 35.35pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;
Parameters for SIP account:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;1.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;public&amp;nbsp;SIPAccount(&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;2.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bool&amp;nbsp;registrationRequired,&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;3.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string&amp;nbsp;displayName,&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;4.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string&amp;nbsp;userName,&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;5.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string&amp;nbsp;registerName,&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;6.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string&amp;nbsp;registerPassword,&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin: 0cm 0cm 0.0001pt 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;7.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string&amp;nbsp;domainServerHost,&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;8.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;domainServerPort)&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 35.35pt; text-align: justify;&quot;&gt;&lt;b&gt;Parameters:&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;9.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;registrationRequired&lt;/b&gt;&lt;br /&gt;
The registration to the PBX is required. Please note that if you do not register in the PBX, you will only be able to make calls but you will not be able to receive calls.&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;10.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;displayName&lt;/b&gt;&lt;br /&gt;
This name will be displayed for the the called party during the calls.&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;11.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;userName&lt;/b&gt;&lt;br /&gt;
This is the username will be used during calls.&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;12.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;registerName&lt;/b&gt;&lt;br /&gt;
This is the name used for registration.&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;13.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;registerPassword&lt;/b&gt;&lt;br /&gt;
This password is needed for registration and for authentication during calls.&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;14.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;domainServerHost&lt;/b&gt;&lt;br /&gt;
This is the IP address or domain name of the PBX.&lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 70.7pt; text-indent: -14.15pt;&quot;&gt;&lt;span&gt;&lt;span&gt;15.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;domainServerPort&lt;/b&gt;&lt;br /&gt;
This is the port number of the PBX. &lt;/div&gt;&lt;div class=&quot;MsoBodyText&quot; style=&quot;margin-left: 35.35pt;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;After configuration, click on &lt;b&gt;Build&lt;/b&gt; button in Visual Studio or click &lt;b&gt;F5&lt;/b&gt; on your keypad. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 14pt;&quot;&gt;Now you see, that building an Autodialer isn&#39;t necessarily a hard thing. You only have to find the appropriate help. Here you can find the sample program for this sdk:&lt;/span&gt;  &lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;http://www.voip-sip-sdk.com/p_130-how-to-build-an-autodialer-in-c-using-the-ozeki-voip-sip-softphone-source-code-voip.html&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/6445608278067523057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/6445608278067523057' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/6445608278067523057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/6445608278067523057'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/07/how-to-build-your-own-c-autodialer.html' title='How to build your own C# Autodialer'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-6000787151091028729</id><published>2011-07-14T08:01:00.000-07:00</published><updated>2011-07-14T08:01:40.262-07:00</updated><title type='text'>Creating SqlParameters Best Practices</title><content type='html'>&lt;div class=&quot;entry_wrap fix&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;entry_content&quot;&gt;This article summarizes some nice ways to create SqlParameter  arrays.&amp;nbsp; When we use SqlHelper, or even without SqlHelper when we use  SqlCommands directly, and we want to pass an array of SqlParameters to  the function.&amp;nbsp; The method I will discuss does not require you to  hard-code the number of elements, nor does it require you to create a  temporary list of some sort, but it requires you to have all the values  up front that you want to insert into the list. &lt;br /&gt;
There are several ways to create this array.&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;One is to hardcode the number of parameters as follows: &lt;div class=&quot;syntaxhighlighter &quot; id=&quot;highlighter_210956&quot;&gt;&lt;div class=&quot;bar&quot;&gt;&lt;div class=&quot;toolbar&quot;&gt;&lt;a class=&quot;item viewSource&quot; href=&quot;http://www.sharpdeveloper.net/content/archive/2007/05/25/creating-sqlparameters-best-practices.aspx#viewSource&quot; style=&quot;height: 16px; width: 16px;&quot; title=&quot;view source&quot;&gt;view source&lt;/a&gt;&lt;a class=&quot;item printSource&quot; href=&quot;http://www.sharpdeveloper.net/content/archive/2007/05/25/creating-sqlparameters-best-practices.aspx#printSource&quot; style=&quot;height: 16px; width: 16px;&quot; title=&quot;print&quot;&gt;print&lt;/a&gt;&lt;a class=&quot;item about&quot; href=&quot;http://www.sharpdeveloper.net/content/archive/2007/05/25/creating-sqlparameters-best-practices.aspx#about&quot; style=&quot;height: 16px; width: 16px;&quot; title=&quot;?&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;lines&quot;&gt;&lt;div class=&quot;line alt1&quot;&gt;&lt;code class=&quot;number&quot;&gt;1.&lt;/code&gt;&lt;span class=&quot;content&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;margin-left: 0px ! important;&quot;&gt;&lt;code class=&quot;plain&quot;&gt;SqlParameter array SqlParameter[] sqlParams = &lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;new&lt;/code&gt; &lt;code class=&quot;plain&quot;&gt;SqlParameter[5];&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;An evolution of this is to use an ArrayList&lt;strong&gt;&lt;br /&gt;
ArrayList sqlParams = new ArrayList();&lt;/strong&gt;&lt;br /&gt;
Then add the parameters using sqlParams.Add(…) to add them&lt;br /&gt;
Then the final step is to use sqlParams.ToArray() and pass that to your SqlHelper. &lt;/li&gt;
&lt;li&gt;Another evolution would be to use a Generic list of SqlParameters&lt;br /&gt;
&lt;strong&gt;System.Collections.Generic.List&lt;sqlparameter&gt; sqlParams = new&amp;nbsp; System.Collections.Generic.List&lt;sqlparameter&gt;(); &lt;/sqlparameter&gt;&lt;/sqlparameter&gt;&lt;/strong&gt;&lt;strong&gt;    &lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;But in my opinion the BEST way of creating your SqlParameter array is as follows:     &lt;span style=&quot;font-weight: bold;&quot;&gt;C#&lt;/span&gt; Example:&lt;br /&gt;
&lt;span id=&quot;ctl00_ContentPlaceHolder1_output&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Vb.Net&lt;/span&gt; Example:&lt;br /&gt;
&lt;span id=&quot;ctl00_ContentPlaceHolder1_output&quot;&gt;&lt;/span&gt;     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;You can even use conditionals such as if your questionCode is null you want to insert a null (C# example):&lt;br /&gt;
4.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;SqlParameter[] sqlParams = new SqlParameter[] {
     new SqlParameter(&quot;@username&quot;, strUserName) ,
     new SqlParameter(&quot;@password&quot;, strPassword)
  };

  Dim params As SqlParameter() = { _
     New SqlParameter(&quot;@CenterID&quot;, centerID), _
     New SqlParameter(&quot;@TypeID&quot;, typeID) _
  }

SqlParameter[] sqlParams = new SqlParameter[] {
  new SqlParameter(&quot;@Required&quot;, required),
  questionCode == null ? new SqlParameter(&quot;@Code&quot;, DBNull.Value) : new SqlParameter(&quot;@Code&quot;, questionCode)
};&lt;/pre&gt;&lt;br /&gt;
&lt;em&gt;Update Aug7’09&lt;/em&gt; – Not specifying the DB type of the parameter  will actually be slower than manually specifying the parameter sql types  (ie int, varchar, etc).  However, I find the tradeoff for convenience  to be worth a slight loss of speed.  This also allows you to change the  parameter type in the stored procedure (say from datetime to string),  without having to also update it here. &lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/6000787151091028729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/6000787151091028729' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/6000787151091028729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/6000787151091028729'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/07/creating-sqlparameters-best-practices.html' title='Creating SqlParameters Best Practices'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-2388913120925898481</id><published>2011-07-13T12:28:00.000-07:00</published><updated>2011-07-13T12:28:05.498-07:00</updated><title type='text'>C# Coding Standards Series – Naming Conventions</title><content type='html'>&lt;strong&gt;Terminology and Definitions for Naming Conventions&lt;/strong&gt;:&lt;br /&gt;
&lt;strong&gt;Camel Case&lt;/strong&gt; (&lt;strong&gt;&lt;em&gt;camelCase&lt;/em&gt;&lt;/strong&gt;): The first letter of the word is lower case and then each first letter of the part of the word is upper case;&lt;br /&gt;
&lt;strong&gt;Pascal Case&lt;/strong&gt; (&lt;strong&gt;&lt;em&gt;PascalCase&lt;/em&gt;&lt;/strong&gt;): The first letter of the word is upper case and then each first letter of the part of the word is upper case;&lt;br /&gt;
&lt;strong&gt;Underscode Prefix&lt;/strong&gt; (&lt;strong&gt;&lt;em&gt;_underscore&lt;/em&gt;&lt;/strong&gt;): The word begins with underscore char and for the rest of the word use &lt;strong&gt;&lt;em&gt;camelCase &lt;/em&gt;&lt;/strong&gt;rule;&lt;br /&gt;
&lt;h3&gt;General Rules&lt;/h3&gt;1. Use Pascal Case for Class names:&lt;br /&gt;
&lt;em&gt;Ex:&lt;/em&gt;&lt;br /&gt;
&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;csharp&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #0600ff; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #6666cc; font-weight: bold;&quot;&gt;class&lt;/span&gt; HelloWorld &lt;span style=&quot;color: green;&quot;&gt;{&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;...&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;2. Use Pascal Case for Method names:&lt;br /&gt;
&lt;em&gt;Ex:&lt;/em&gt;&lt;br /&gt;
&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;csharp&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #0600ff; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #6666cc; font-weight: bold;&quot;&gt;void&lt;/span&gt; SayHello&lt;span style=&quot;color: green;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #6666cc; font-weight: bold;&quot;&gt;string&lt;/span&gt; name&lt;span style=&quot;color: green;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;{&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;...&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;3. Use Camel Case for variables and method parameters:&lt;br /&gt;
&lt;em&gt;Ex:&lt;/em&gt;&lt;br /&gt;
&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
5
6
7
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;csharp&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #6666cc; font-weight: bold;&quot;&gt;int&lt;/span&gt; totalCount &lt;span style=&quot;color: green;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #6666cc; font-weight: bold;&quot;&gt;void&lt;/span&gt; SayHello&lt;span style=&quot;color: green;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #6666cc; font-weight: bold;&quot;&gt;string&lt;/span&gt; name&lt;span style=&quot;color: green;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: green;&quot;&gt;{&lt;/span&gt;
     &lt;span style=&quot;color: #6666cc; font-weight: bold;&quot;&gt;string&lt;/span&gt; fullMessage &lt;span style=&quot;color: green;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #666666;&quot;&gt;&quot;Hello &quot;&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;+&lt;/span&gt; name&lt;span style=&quot;color: green;&quot;&gt;;&lt;/span&gt;
     &lt;span style=&quot;color: teal; font-style: italic;&quot;&gt;//...&lt;/span&gt;
&lt;span style=&quot;color: green;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;4. Avoid all upper case or all lower case names;&lt;br /&gt;
5. Do not use Hungarian notation:&lt;br /&gt;
&lt;em&gt;Example of Hungarian Notation:&lt;/em&gt;&lt;br /&gt;
string m_sName; (the prefix &lt;strong&gt;m_&lt;/strong&gt; means that is a member variable and &lt;strong&gt;s&lt;/strong&gt; means that is a string data type);&lt;br /&gt;
6. Avoid abbreviations longer than 5 characters;&lt;br /&gt;
7. Avoid using abbreviations unless the full name is excessive:&lt;br /&gt;
&lt;em&gt;Ex:&lt;/em&gt;&lt;br /&gt;
&lt;span style=&quot;color: green;&quot;&gt;Good:&lt;/span&gt; &lt;strong&gt;string address;&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;Not good:&lt;/span&gt; &lt;strong&gt;string addr;&lt;/strong&gt;&lt;br /&gt;
8. Use meaningfull, descriptive words for naming variables;&lt;br /&gt;
9. Try to prefix Boolean variables with “&lt;strong&gt;&lt;em&gt;Can&lt;/em&gt;&lt;/strong&gt;”, “&lt;strong&gt;&lt;em&gt;Is&lt;/em&gt;&lt;/strong&gt;” or “&lt;strong&gt;&lt;em&gt;Has&lt;/em&gt;&lt;/strong&gt;”;&lt;br /&gt;
10. Do not use &lt;strong&gt;&lt;em&gt;Underscore Prefix&lt;/em&gt;&lt;/strong&gt; for local variables names;&lt;br /&gt;
11. All member variables must use &lt;strong&gt;&lt;em&gt;Underscore Prefix &lt;/em&gt;&lt;/strong&gt;so that they can be identified from other local variables names;&lt;br /&gt;
12. Avoid naming conflicts with existing .NET Framework namespaces or types;&lt;br /&gt;
13. Do not include the parent class name within a property name:&lt;br /&gt;
&lt;em&gt;Ex&lt;/em&gt;: &lt;span style=&quot;color: green;&quot;&gt;Good:&lt;/span&gt; &lt;strong&gt;Customer.Name;&lt;/strong&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;Not good:&lt;/span&gt; &lt;strong&gt;Customer.CustomerName;&lt;/strong&gt;&lt;br /&gt;
14. When defining a root namespace, use a Product, a Company or a Developer name as the root:&lt;br /&gt;
&lt;em&gt;Ex&lt;/em&gt;: &lt;strong&gt;NorthwindApplication.Utilities;&lt;/strong&gt;&lt;br /&gt;
15. Use &lt;strong&gt;&lt;em&gt;Pascal Case&lt;/em&gt;&lt;/strong&gt; for file names;&lt;br /&gt;
16. Method name should tell you what it does;&lt;br /&gt;
17. A method should do only “one job”. Do not combine multiple jobs  in one method even if those jobs have very few lines of code.&lt;br /&gt;
&lt;em&gt;Ex&lt;/em&gt;:&lt;br /&gt;
&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;csharp&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #0600ff; font-weight: bold;&quot;&gt;protected&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #6666cc; font-weight: bold;&quot;&gt;void&lt;/span&gt;&amp;nbsp;SaveCustomerName&lt;span style=&quot;color: green;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #6666cc; font-weight: bold;&quot;&gt;string&lt;/span&gt;&amp;nbsp;customerName&lt;span style=&quot;color: green;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: green;&quot;&gt;{&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal; font-style: italic;&quot;&gt;//code&amp;nbsp;here...&lt;/span&gt;
&lt;span style=&quot;color: green;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;
&lt;h3&gt;Naming Conventions for ASP.NET Controls&lt;/h3&gt;In general, naming ASP.NET controls is made using &lt;strong&gt;&lt;em&gt;Camel Case&lt;/em&gt;&lt;/strong&gt; naming convention, where the prefix of the name is the abbreviation of the control type name.&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt; &lt;table cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;&lt;strong&gt;Abbreviation&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;ASP.NET Control&lt;/strong&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; colspan=&quot;2&quot; valign=&quot;top&quot; width=&quot;284&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;&lt;strong&gt;STANDARD CONTROLS&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;btn&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;Button&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;cb&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;CheckBox&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;cbl&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;CheckBoxList&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;ddl&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;DropDownList&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;fu&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;FileUpload&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;hdn&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;HiddenField&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;lnk&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;Hyperlink&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;img&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;Image&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;ibtn(btn)&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;ImageButton&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;lbl&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;Label&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;lbtn(btn)&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;LinkButton&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;lb&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;ListBox&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;lit&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;Literal&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;mv&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;MultiView&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;pnl&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;Panel&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;ph&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;PlaceHolder&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;rb&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;RadioButton&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;rbl&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;RadioButtonList&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;tbl&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;Table&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;txt&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;TextBox&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;v&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;View&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; colspan=&quot;2&quot; valign=&quot;top&quot; width=&quot;284&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;&lt;strong&gt;DATA CONTROLS&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;dtl&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;DataList&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;dp&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;DataPager&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;dtv&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;DetailsView&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;ets&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;EntityDataSource&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;fv&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;FormView&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;gv&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;GridView&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;lds&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;LinqDataSource&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;lv&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;ListView&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;ods&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;ObjectDataSource&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;qe&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;QueryExtender&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;rpt&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;Repeater&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;smd&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;SiteMapDataSource&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;sds&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot; width=&quot;189&quot;&gt;SqlDataSource&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;xds&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;XmlDataSource&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; colspan=&quot;2&quot; valign=&quot;top&quot; width=&quot;284&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;&lt;strong&gt;VALIDATION CONTROLS&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;cpv&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;CompareValidator&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;ctv&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;CustomValidator&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;rv&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;RangeValidator&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;rev&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;RegularExpressionValidator&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;rfv&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;RequiredFieldValidator&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;vs&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;ValidationSummary&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;&lt;/div&gt;Please share your opinion about this post by commenting below.</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/2388913120925898481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/2388913120925898481' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/2388913120925898481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/2388913120925898481'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/07/c-coding-standards-series-naming.html' title='C# Coding Standards Series – Naming Conventions'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-840126337588194316</id><published>2011-07-13T12:16:00.001-07:00</published><updated>2011-07-13T12:16:39.651-07:00</updated><title type='text'>(hide this) .net Naming Conventions and Programming Standards - Best Practices</title><content type='html'>&lt;div id=&quot;blogPostBody&quot;&gt;  This article is the single most popular bit of content from my old site and blog, bar none. While I think books such as the &lt;a class=&quot;external&quot; href=&quot;http://www.amazon.com/Framework-Design-Guidelines-Conventions-Libraries/dp/0321545613/&quot; target=&quot;_blank&quot;&gt;.NET Framework Design Guidelines by Krzystof Cwalina and Brad Abrams&lt;/a&gt; do a better job explaining all the standards, I&#39;ve kept this page up for quick reference and to support the schools and individuals currently using it.&lt;br /&gt;
&lt;h3&gt;Common .NET Naming Conventions&lt;/h3&gt;These are the industry-accepted standard naming conventions for C# and VB.NET programs. For additional information, please see the MSDN help documentation and the book referenced above. While individual naming conventions at organizations may vary (Microsoft only suggests conventions for public and protected items), the list below is quickly becoming the de-facto standard in the industry. Please note the absence of Hungarian Notation. These naming standards should find their way into all of your .NET development, including ASP.NET Web applications, WPF, Silverlight and &lt;a class=&quot;external&quot; href=&quot;http://www.windowsclient.net/&quot; target=&quot;_blank&quot;&gt;Windows Forms&lt;/a&gt; applications.&lt;br /&gt;
Note that while this document predates the online and printed standards documentation from Microsoft, everything below which indicates it is based on .NET library standards is consistent with that documentation and Brad&#39;s book. In areas where Microsoft has not provided guidance (Microsoft generally doesn&#39;t care what you do in private/non-exposed code. In fact, they aren&#39;t even consistent in their internal code in the .NET framework), de facto standards have emerged, and I have captured them here.&lt;br /&gt;
The &quot;ux&quot; naming convention for controls is something I have added and found to be helpful in Windows Forms, but not so much in Silverlight and WPF. It is not based on any official standards, but instead based upon a multitude of projects by my teams and others, as well as on-line discussions on the topic. While I strongly recommend that you follow Microsoft guidelines when present, I encourage you to try out the items marked as extensions below and see how they work for you before committing to them.&lt;br /&gt;
&lt;div&gt; &lt;table border=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td valign=&quot;top&quot;&gt; &lt;table border=&quot;0&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;background-color: #cfe8ff; border: cornflowerblue 1px solid;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;background-color: black; color: whitesmoke; font-variant: normal;&quot; width=&quot;95%&quot;&gt; &lt;td style=&quot;color: whitesmoke; font-size: larger; font-weight: bold;&quot;&gt; Type&lt;/td&gt; &lt;td style=&quot;color: whitesmoke; font-size: larger; font-weight: bold;&quot;&gt; Standard / Convention&lt;/td&gt; &lt;td style=&quot;color: whitesmoke; font-size: larger; font-weight: bold;&quot;&gt; Example&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;Namespaces&lt;/td&gt; &lt;td&gt; &lt;strong&gt;&lt;span&gt;Standard Based Upon Microsoft .NET Library Standards&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Pascal Case, no underscores. Use CompanyName.TechnologyName as root. If you don&#39;t have a company, use your domain name or your own initials. Note that any acronyms of three or more letters should be pascal case (Xml instead of XML) instead of all caps.&lt;br /&gt;
Why: This convention is consistent with the .NET Framework and is easy to read.&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;code&gt;AppliedIS.TimeCard.BusinessRules&lt;/code&gt; &lt;br /&gt;
&lt;code&gt;IrritatedVowel.Controllers&lt;/code&gt; &lt;br /&gt;
&lt;code&gt;PeteBrown.DotNetTraining.InheritanceDemo&lt;/code&gt; &lt;code&gt;PeteBrown.DotNetTraining.Xml&lt;/code&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style=&quot;background-color: white;&quot;&gt; &lt;td&gt;Assemblies&lt;/td&gt; &lt;td&gt; &lt;strong&gt;&lt;span&gt;Standard Based Upon Microsoft .NET Library Standards&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
If the assembly contains a single name space, or has an entire self-contained root namespace, name the assembly the same name as the namespace.&lt;br /&gt;
Why: This convention is consistent with the .NET Framework and is easy to read. More importantly, however, it keeps your assembly names and namespaces lined up, making it really easy to figure out what is any particular assembly, and what assembly you need to reference for any given class.&lt;br /&gt;
&lt;/td&gt; &lt;td&gt; &lt;code&gt;AppliedIS.TimeCard.BusinessRules.dll&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;IrritatedVowel.Controllers.dll&lt;/code&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;Classes and Structs&lt;/td&gt; &lt;td&gt; &lt;strong&gt;&lt;span&gt;Standard Based Upon Microsoft .NET Library Standards&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Pascal Case, no underscores or leading &quot;C&quot; or &quot;cls&quot;. Classes may begin with an &quot;I&quot; only if the letter following the I is not capitalized, otherwise it looks like an Interface. Classes should not have the same name as the namespace in which they reside. Any acronyms of three or more letters should be pascal case, not all caps. Try to avoid abbreviations, and try to always use nouns.&lt;br /&gt;
Why: This convention is consistent with the .NET Framework and is easy to read.&lt;br /&gt;
&lt;/td&gt; &lt;td&gt; &lt;code&gt;Widget&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;InstanceManager&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;XmlDocument&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;MainForm&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;DocumentForm&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;HeaderControl&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;CustomerListDataSet (typed dataset)&lt;/code&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr style=&quot;background-color: white;&quot;&gt; &lt;td&gt;Collection Classes&lt;/td&gt; &lt;td&gt; &lt;strong&gt;&lt;span&gt;Standard Based Upon Microsoft .NET Library Standards&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Follow class naming conventions, but add Collection to the end of the name&lt;br /&gt;
Why: This convention is consistent with the .NET Framework and is easy to read.&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;code&gt;WidgetCollection&lt;/code&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;Delegate Classes&lt;/td&gt; &lt;td&gt; &lt;strong&gt;&lt;span&gt;Standard Based Upon Microsoft .NET Library Standards&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Follow class naming conventions, but add Delegate to the end of the name&lt;br /&gt;
Why: This convention is consistent with the .NET Framework and is easy to read.&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;code&gt;WidgetCallbackDelegate&lt;/code&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style=&quot;background-color: white;&quot;&gt; &lt;td&gt;Exception Classes&lt;/td&gt; &lt;td&gt; &lt;strong&gt;&lt;span&gt;Standard Based Upon Microsoft .NET Library Standards&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Follow class naming conventions, but add Exception to the end of the name&lt;br /&gt;
Why: This convention is consistent with the .NET Framework and is easy to read.&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;code&gt;InvalidTransactionException&lt;/code&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;Attribute Classes&lt;/td&gt; &lt;td&gt; &lt;strong&gt;&lt;span&gt;Standard Based Upon Microsoft .NET Library Standards&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Follow class naming conventions, but add Attribute to the end of the name&lt;br /&gt;
Why: This convention is consistent with the .NET Framework and is easy to read.&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;code&gt;WebServiceAttribute&lt;/code&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr style=&quot;background-color: white;&quot;&gt; &lt;td&gt;Interfaces&lt;/td&gt; &lt;td&gt; &lt;strong&gt;&lt;span&gt;Standard Based Upon Microsoft .NET Library Standards&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Follow class naming conventions, but start the name with &quot;I&quot; and capitalize the letter following the &quot;I&quot;&lt;br /&gt;
Why: This convention is consistent with the .NET Framework and is easy to read. It also distinguishes classes from interfaces, where (unlike in VB6) are truly different beings. This avoid name collisions as well, as it is quite common to have IFoo and a class named Foo that implements IFoo.&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;code&gt;IWidget&lt;/code&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;Enumerations&lt;/td&gt; &lt;td&gt; &lt;strong&gt;&lt;span&gt;Standard Based Upon Microsoft .NET Library Standards&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Follow class naming conventions. Do not add &quot;Enum&quot; to the end of the enumeration name. If the enumeration represents a set of bitwise flags, end the name with a plural.&lt;br /&gt;
Why: This convention is consistent with the .NET Framework and is easy to read.&lt;br /&gt;
&lt;/td&gt; &lt;td&gt; &lt;code&gt;SearchOptions (bitwise flags)&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;AcceptRejectRule (normal enum)&lt;/code&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr style=&quot;background-color: white;&quot;&gt; &lt;td&gt;Functions and Subs&lt;/td&gt; &lt;td&gt; &lt;strong&gt;&lt;span&gt;Standard Based Upon Microsoft .NET Library Standards&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Pascal Case, no underscores except in the event handlers. Try to avoid abbreviations. Many programmers have a nasty habit of overly abbreviating everything. This should be discouraged. We&#39;re not designing license plates or being charged by the letter :)&lt;br /&gt;
Functions and subs must differ by more than case to be usable from case-insensitive languages like Visual Basic .NET&lt;br /&gt;
Why: This convention is consistent with the .NET Framework and is easy to read.&lt;br /&gt;
&lt;/td&gt; &lt;td&gt; VB: &lt;code&gt;Public Sub DoSomething(...)&lt;/code&gt;&lt;br /&gt;
C#: &lt;code&gt;public void DoSomething(...)&lt;/code&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;Properties and Public * Member Variables&lt;/td&gt; &lt;td&gt; &lt;strong&gt;&lt;span&gt;Standard Based Upon Microsoft .NET Library Standards&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Pascal Case, no underscores. Try to avoid abbreviations. Members must differ by more than case to be usable from case-insensitive languages like Visual Basic .NET.&lt;br /&gt;
Why: This convention is consistent with the .NET Framework and is easy to read.&lt;br /&gt;
&lt;/td&gt; &lt;td&gt; VB: &lt;code&gt;Public Property RecordId As Integer&lt;/code&gt;&lt;br /&gt;
C#: &lt;code&gt;public int RecordId&lt;/code&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr style=&quot;background-color: white;&quot;&gt; &lt;td&gt;Parameters&lt;/td&gt; &lt;td&gt; &lt;strong&gt;&lt;span&gt;Standard Based Upon Microsoft .NET Library Standards&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Camel Case. Try to avoid abbreviations. Parameters must differ by more than case to be usable from case-insensitive languages like Visual Basic .NET.&lt;br /&gt;
Why: This convention is consistent with the .NET Framework and is easy to read.&lt;br /&gt;
&lt;/td&gt; &lt;td&gt; VB: &lt;code&gt;ByRef recordId As Integer&lt;/code&gt;&lt;br /&gt;
C#: &lt;code&gt;ref int recordId&lt;/code&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;Procedure-Level Variables&lt;/td&gt; &lt;td&gt; &lt;strong&gt;&lt;span&gt;Standard Based Upon De facto Industry-Accepted Practices&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Camel Case&lt;br /&gt;
Why: This convention is consistent with the .NET Framework and is easy to read. It also avoids naming collisions with class-level variables (see below)&lt;br /&gt;
&lt;/td&gt; &lt;td&gt; VB: &lt;code&gt;Dim recordId As Integer&lt;/code&gt;&lt;br /&gt;
C#: &lt;code&gt;int recordId ;&lt;/code&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr style=&quot;background-color: white;&quot;&gt; &lt;td&gt;Class-Level Private and Protected Variables&lt;/td&gt; &lt;td&gt; &lt;strong&gt;&lt;span&gt;Standard Based Upon De facto Industry-Accepted Practices&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Camel Case with Leading Underscore. In VB.NET, always indicate &quot;Protected&quot; or &quot;Private&quot;, do not use &quot;Dim&quot;. Use of &quot;m_&quot; is discouraged, as is use of a variable name that differs from the property by only case, especially with protected variables as that violates compliance, and will make your life a pain if you program in VB.NET, as you would have to name your members something different from the accessor/mutator properties.&lt;br /&gt;
Of all the items here, the leading underscore is really the only controversial one. I personally prefer it over straight underscore-less camel case for my private variables so that I don&#39;t have to qualify variable names with &quot;this.&quot; to distinguish from parameters in constructors or elsewhere where I likely will have a naming collision. With VB.NET&#39;s case insensitivity, this is even more important as your accessor properties will usually have the same name as your private member variables except for the underscore.&lt;br /&gt;
As far as m_ goes, it is really just about aesthetics. I (and many others) find m_ ugly, as it looks like there is a hole in the variable name. It&#39;s almost offensive. I used to use it in VB6 all the time, but that was only because variables could not have a leading underscore. I couldn&#39;t be happier to see it go away.&lt;br /&gt;
Microsoft recommends against the m_ (and the straight _) even though they did both in their code. Also, prefixing with a straight &quot;m&quot; is right out. Of course, since they code mainly in C#, they can have private members that differ only in case from the properties. VB folks have to do something else. Rather than try and come up with language-by-language special cases, I recommend the leading underscore for all languages that will support it.&lt;br /&gt;
If I want my class to be fully CLS-compliant, I could leave off the prefix on any C# protected member variables. In practice, however, I never worry about this as I keep all potentially protected member variables private, and supply protected accessors and mutators instead.&lt;br /&gt;
Why: In a nutshell, this convention is simple (one character), easy to read (your eye is not distracted by other leading characters), and successfully avoids naming collisions with procedure-level variables and class-level properties.&lt;br /&gt;
&lt;/td&gt; &lt;td&gt; VB: &lt;code&gt;Private _recordId As Integer&lt;/code&gt;&lt;br /&gt;
C#: &lt;code&gt;private int _recordId ;&lt;/code&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;Controls on Forms&lt;/td&gt; &lt;td&gt; &lt;strong&gt;&lt;span&gt;An Extension to the Standards&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;May 2009 update&lt;/strong&gt;&lt;br /&gt;
Note that I still consider this useful in many respects, especially for intellisense grouping, but have backed away from using this in recent projects, specifically Silverlight and WPF. I still use an appropriate classification suffix such as Field or Label (but not an actual control type) so that I can differentiate between, say, the last name field and the label for it.&lt;br /&gt;
Examples would be LastNameField, LastNameLabel, NextPageNavigation, PreviousPageNavigation. The classifications you pick will need to make sense to you, and also allow for signficiant flexibility for the designer of the UI to change the control type in Xaml without you having to change the name in the storyboards (runtime checked), code behind (compile-time checked), and control lookups in code behind (runtime checked).&lt;br /&gt;
I backed away simply because it didn&#39;t look right in generated member variables in my applications, or in the x:Name properties in Xaml. It was a code smell issue, albeit a minor one.&lt;br /&gt;
Note also that in Silverlight and WPF, I &lt;strong&gt;only&lt;/strong&gt; name controls which need to be named because they are used in the code behind or are referred to from a storyboard or relative binding. The name is the primary contract between the code and the visual design, and you want to keep that contract as small as possible.&lt;br /&gt;
Note that I have seen the &quot;ux&quot; prefix in example code on the net, and from Microsoft. Some folks still find it useful. You&#39;ll need to make that decision for yourself.&lt;br /&gt;
I do not use the ux prefix when working in XAML-based uI, like &lt;a class=&quot;external&quot; href=&quot;http://silverlight.net/&quot; target=&quot;_blank&quot;&gt;Silverlight&lt;/a&gt; and &lt;a class=&quot;external&quot; href=&quot;http://windowsclient.net/&quot; target=&quot;_blank&quot;&gt;WPF&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Original Information from 2002&lt;/strong&gt;&lt;br /&gt;
In recent projects (since 2002 or so), I have taken to a single prefix for all my UI controls. I typically use &quot;ux&quot; (I used to use &quot;ui&quot;, but it wasn&#39;t set apart well in intellisense). &quot;ux&quot; comes from my usual design abbreviations where it means &quot;User eXperience&quot;, which has also since become a popular acronym. I have found this to be extremely helpful in that I get the desired grouping in the intellisense even better than if I use &quot;txt&quot;, &quot;lbl&quot; etc. It also allows you to change combo boxes to text boxes etc. without having to change the names - something that happens often during initial prototyping, or when programming using highly iterative agile/xp methodologies.&lt;br /&gt;
Why: This convention avoids problems with changing control types (textboxes to drop-down lists, or simple text box to some uber textbox, or text box to date picker, for example), and groups the items together in intellisense. It is also much shorter than most Hungarian conventions, and definitely shorter and less type-dependent than appending the control type to the end of the variable name. I will use generic suffixes which allow me enough freedom to change them around.&lt;br /&gt;
&lt;/td&gt; &lt;td&gt; &lt;code&gt;&quot;ux&quot; prefix&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;uxUserIdField, uxHeaderLabel, uxPatientDateOfBirthField, uxSubmitCommand&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;no &quot;ux&quot; prefix&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;LastNameField, LastNameLabel, SubmitCommand, NextPageNavigation&lt;/code&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr style=&quot;background-color: white;&quot;&gt; &lt;td&gt;Constants&lt;/td&gt; &lt;td&gt; &lt;strong&gt;&lt;span&gt;Standard Based Upon Microsoft .NET Library Standards&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Same naming conventions as public/private member variables or procedure variables of the same scope. If exposed publicly from a class, use PascalCase. If private to a function/sub, use camelCase..&lt;br /&gt;
Do not use SCREAMING_CAPS&lt;br /&gt;
Why: This convention is consistent with the .NET Framework and is easy to read. A sizable section of the Framework Design Guidelines is dedicated to why they chose not to go the SCREAMING_CAPS route. Using SCREAMING_CAPS also exposes more of the implementation than is necessary. Why should a consumer need to know if you have an enum, or (perhaps because they are strings) a class exposing public constants? In the end, you often want to treat them the same way, and black-box the implementation. This convention satisfies that criteria.&lt;br /&gt;
&lt;/td&gt; &lt;td&gt; &lt;code&gt;SomeClass.SomePublicConstant&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;localConstant&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;_privateClassScopedConstant&lt;/code&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;&lt;/div&gt;* Public class-level variables are universally frowned upon. It is considered to be a much better practice to use property procedures (accessors and mutators) to provide read and/or write access to a private member variable. If you must expose a member variable to other classes using &quot;Public&quot;, follow the property naming conventions, but don&#39;t complain if your guilty conscience keeps you up at night ;-).&lt;br /&gt;
You Can find the standards for publicly exposed classes/properties etc at &lt;a class=&quot;external&quot; href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconnamingguidelines.asp&quot; target=&quot;_blank&quot;&gt; MSDN&lt;/a&gt; . If you want to run a tool to validate your code for public standards and required practices, download FXCop or use the analysis tools in Visual Studio.&lt;br /&gt;
&lt;h3&gt;Why Hungarian Has Fallen Out of Favor with .NET&lt;/h3&gt;&lt;em&gt;With his simple question in my guestbook, Andrew Coupe inspired me to write this little blurb here explaining why I feel that Hungarian Notation has outlived its usefulness. If you&#39;re sticking to Hungarian Notation in .NET, waffling, or just plain curious - read on.&lt;/em&gt;&lt;br /&gt;
&lt;a class=&quot;external&quot; href=&quot;http://web.archive.org/web/20001018073323/www.strangecreations.com/library/c/naming.txt&quot; target=&quot;_blank&quot;&gt; True Hungarian Notation&lt;/a&gt; is a naming convention invented by Charles Simonyi from Microsoft back in the 70s. (For more information on its origins, see &lt;a class=&quot;external&quot; href=&quot;http://www.quinion.com/words/articles/hungary.htm&quot; target=&quot;_blank&quot;&gt;this funny article&lt;/a&gt;) Back in the day, one of the more promising versions of Hungarian Notation was used in a way that indicated the purpose or logical type of the variables rather than the language-specific type. For example, instead of indicating something was an int, it would be specified that it was an Id or a Quantity. When Hungarian was used this way, it was very useful, especially in languages where variable names were limited in length.&lt;br /&gt;
Shortly after the notation started being used, developers came up with standard language-specific data-type based prefixes. I remember when I worked in C/C++, we had things such as &quot;rgsz&quot; meaning an array of zero-terminated strings (rg is short for&quot;reference to a graph&quot; - an array in C/C++). This was useful for a while, but the prefixes became unwieldy in both in length and in understanding the permutations and combinations; you ended up with things not too far from &lt;strong&gt;rgszxyzpdqOrderNo&lt;/strong&gt;. Think that&#39;s a stretch? Imagine what the name of a variable that contained a long pointer to an array of arrays of long pointers to some particular structure looked like when you mapped out the full prefix. Yes, we really did have the occassional variable like that in our programs, especially the database engine I worked on.&lt;br /&gt;
Then along came Visual Basic. This great rapid application development tool introduced a lot of programmers to Windows programming. Many them were brand new to programming, and gave their variables meaningless or less than helpful, and almost always inconsistent names. In response to this influx of bad code, good VB developers started to use two different variations of the Hungarian naming conventions. One was a traditional &quot;as many letters as needed&quot; set with prefixes such as &quot;s&quot; for String, &quot;i&quot; for Integer, and sometimes things like &quot;arrl&quot; for an array of longs. The second school standardized on three letters for all prefixes &quot;str&quot; for String, and &quot;int&quot; for Integer being two examples.&lt;br /&gt;
Some people took the conventions to extremes, and did silly things like prefix database table names with &quot;tbl&quot;, stored procedures with &quot;P&quot;, VB classes with &quot;C&quot; or &quot;cls&quot;, and function names with the Hungarian for their return type. That was and is still just pure silliness, IMHO. I do, however, think that &quot;I&quot; in front of an interface is important as interfaces need to be treated very differently from classes.&lt;br /&gt;
During this time, VB4 and eventually VB5 and VB6 came out. VB4 introduced classes and some object-oriented language features to these developers. Developers needed to remember to use &quot;Set&quot; when assigning object variables, and had to remember to set them to &quot;Nothing&quot; when they were done with them. To assist in remembering to do this, developers would prefix all their object variables with &quot;obj&quot; or &quot;o&quot;. Typical code around this time was nothing but a ton of variables with names like objResults and oHenry. It looked just a bit odd, and wasn&#39;t particularly helpful.&lt;br /&gt;
Those of us who worked a lot with COM objects in Visual Basic realized that the prefixes made no sense in public interfaces. In fact, they looked plain awful. Many of us adopted conventions that stated that anything exposed via COM would not have any prefixes whatsoever. That included parameters, functions, classes, etc. This was inline with what Microsoft and most 3rd-party vendors did with all the COM libraries and ActiveX controls they provided.&lt;br /&gt;
At the same time, those of us working on large projects noticed a definite laziness on the part of some other programmers (you know who you are! &lt;g&gt;) when it came to updating the variable prefixes when they changed a variable from, say, an Integer to a Long. This caused far more confusion than was worth. When coupled with the huge &lt;a class=&quot;external&quot; href=&quot;http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q110/2/64.asp&amp;amp;NoWebContent=1&quot; target=&quot;_blank&quot;&gt; multi-page lists&lt;/a&gt; of &quot;all the prefixes&quot; for every possible type you could think of, Hungarian started to get in the way more than it helped.&lt;/g&gt;&lt;br /&gt;
Along comes .NET and just about &lt;strong&gt;everything&lt;/strong&gt; is an object or can be boxed as such, and everything public is exposed to other languages - languages which may not use the same names for the variables we use (this was the same issue we had when writing for COM). If I want to know a variable&#39;s type, I can hover over it with the mouse in the VS.NET IDE. If I want to know a variable&#39;s &lt;strong&gt;use&lt;/strong&gt;, I simply look at the well-worded variable name.&lt;br /&gt;
Now, rather than memorizing lists of prefixes, or prefixing everything with &quot;obj&quot;, programmers are able to concentrate on the purpose of the variable rather than the underlying type. This alone has increased programmer productivity by removing the requirement to perform that mental prefix lookup - which for some of us was like a SQL Server full-table scan &lt;g&gt;.&lt;/g&gt;&lt;br /&gt;
Since the .NET languages were a reasonably clean break from the old versions, it made sense for Microsoft and .NET developers to also change the expected naming conventions at the same time. They knew the adoption of the new conventions would be more likely (and less painful) with the platform shift.&lt;br /&gt;
.NET variables and types can have extremely long names, names that can describe the &lt;strong&gt;purpose&lt;/strong&gt; of a variable rather than the underlying type. We don&#39;t have to pack as much meaning as possible into just a few letters. Control-space makes typing the long names completely painless, and the long names really assist in understanding and documentation.&lt;br /&gt;
Some people still stick to the old Hungarian notation, but those are the hold-outs. Sharing code with them becomes frustrating as the conventions have to be all modified when you do so. If everyone follows the Microsoft-recommended .NET conventions, information exchange and collaboration becomes much easier :-) If you are one of these hold-outs, and have good reasons for sticking to Hungarian, I&#39;d love to hear from you via the contact link at the bottom of this page.&lt;br /&gt;
UI controls are something that are still in flux when it comes to conventions. The reason Hungarian is still often used for them is to ensure they are grouped in intellisense. Hungarian is definitely not perfect for this, but it works.&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/840126337588194316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/840126337588194316' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/840126337588194316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/840126337588194316'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/07/hide-this-net-naming-conventions-and.html' title='(hide this) .net Naming Conventions and Programming Standards - Best Practices'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5095462228187295903.post-3904617114673530942</id><published>2011-07-13T12:14:00.000-07:00</published><updated>2011-07-13T12:14:09.669-07:00</updated><title type='text'>Resources - ASP.Net Coding Standards</title><content type='html'>&lt;h2&gt; Adopting a common coding standard across your web applications&lt;/h2&gt;&lt;em&gt;Note: These standards assume C# but are just as applicable to VB          etc. All these standards stay as close as possible to those recommended          by Microsoft.&lt;/em&gt;&lt;br /&gt;
The &lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconNETFrameworkDesignGuidelines.asp&quot;&gt;Microsoft&#39;s          Design Guidelines for Class Library Developers&lt;/a&gt; (MSDN site) is a useful          set of guidelines which all ASP.Net developers should take a look at.          In particular, those new to C# coding should see the &lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconnamingguidelines.asp&quot;&gt;naming          conventions&lt;/a&gt; section, including capitalisation conventions (Pascal          vs camel etc) and when to use nouns, verbs etc for naming of identifiers.          It is interesting to note that Microsoft are moving away from the hungarian          style of notation in .Net (I think based on the premise that everything          is an object anyway in the framework and identifier names should be based          on semantics not types).&lt;br /&gt;
Although Microsoft&#39;s guidelines are an excellent guide, I created this          standards page, as I could not find a one-stop summary of standards I          could follow quickly when building ASP.Net web applications - Microsoft&#39;s          are not exactly a quick reference guide! Also, they do not target ASP.Net          specifics (e.g. Web Control naming).&lt;br /&gt;
&lt;h3&gt;Naming and Capitalisation&lt;/h3&gt;Below summarises the naming recommendations for identifiers in .Net.          Pascal casing is used mainly (ie capitalise first letter of each word)          with camel casing (capitalise each word except for the first one) being          used in certain circumstances. &lt;br /&gt;
&lt;table border=&quot;1&quot; cellspacing=&quot;0&quot; class=&quot;txtBlackSmall&quot; summary=&quot;layout table for naming conventions&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;            &lt;td width=&quot;15%&quot;&gt;&lt;strong&gt;Identifier&lt;/strong&gt;&lt;/td&gt;           &lt;td width=&quot;14%&quot;&gt;&lt;strong&gt;Case&lt;/strong&gt;&lt;/td&gt;           &lt;td width=&quot;27%&quot;&gt;&lt;strong&gt;Examples&lt;/strong&gt;&lt;/td&gt;           &lt;td width=&quot;26%&quot;&gt;&lt;strong&gt;Additional Notes&lt;/strong&gt;&lt;/td&gt;           &lt;td width=&quot;18%&quot;&gt;&lt;strong&gt;Detailed Info&lt;/strong&gt;&lt;/td&gt;         &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;            &lt;td&gt;Class&lt;/td&gt;           &lt;td&gt;Pascal&lt;/td&gt;           &lt;td&gt;Person, BankVault, SMSMessage, Dept&lt;/td&gt;           &lt;td&gt;Class names should be based on &quot;objects&quot; or &quot;real              things&quot; and should generally be &lt;strong&gt;nouns&lt;/strong&gt;.&lt;/td&gt;           &lt;td&gt;              &lt;div align=&quot;center&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconclassnamingguidelines.asp&quot;&gt;&lt;img alt=&quot;MSDN site - more details&quot; border=&quot;0&quot; height=&quot;20&quot; src=&quot;http://www.visualize.uk.com/images/MSDN.gif&quot; width=&quot;40&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;            &lt;td&gt;Method&lt;/td&gt;           &lt;td&gt;Pascal&lt;/td&gt;           &lt;td&gt;GetDetails, UpdateStore&lt;/td&gt;           &lt;td&gt;Methods should use &lt;strong&gt;verbs&lt;/strong&gt; or verb phrases.&lt;/td&gt;           &lt;td&gt;              &lt;div align=&quot;center&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;            &lt;td&gt;Parameter&lt;/td&gt;           &lt;td&gt;camel&lt;/td&gt;           &lt;td&gt;personName, bankCode&lt;/td&gt;           &lt;td&gt;&amp;nbsp;&lt;/td&gt;           &lt;td&gt;              &lt;div align=&quot;center&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconparameternamingguidelines.asp&quot;&gt;&lt;img alt=&quot;MSDN site - more details&quot; border=&quot;0&quot; height=&quot;20&quot; src=&quot;http://www.visualize.uk.com/images/MSDN.gif&quot; width=&quot;40&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;            &lt;td&gt;Interface&lt;/td&gt;           &lt;td&gt;Pascal with &quot;I&quot; prefix&lt;/td&gt;           &lt;td&gt;IDisposable&lt;/td&gt;           &lt;td&gt;One of the few times when prefixing is adopted.&lt;/td&gt;           &lt;td&gt;              &lt;div align=&quot;center&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconinterfacenamingguidelines.asp&quot;&gt;&lt;img alt=&quot;MSDN site - more details&quot; border=&quot;0&quot; height=&quot;20&quot; src=&quot;http://www.visualize.uk.com/images/MSDN.gif&quot; width=&quot;40&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;            &lt;td&gt;              Property&lt;br /&gt;
Associated private member variable&lt;br /&gt;
&lt;/td&gt;           &lt;td&gt;              Pascal&lt;br /&gt;
_camelCase&lt;br /&gt;
&lt;/td&gt;           &lt;td&gt;              ForeColor, BackColor&lt;br /&gt;
_foreColor, _backColor&lt;br /&gt;
&lt;/td&gt;           &lt;td&gt;Use underscore camel casing for the private member variables, but              keep the names the same as associated property accessors.&lt;/td&gt;           &lt;td&gt;              &lt;div align=&quot;center&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconpropertynamingguidelines.asp&quot;&gt;&lt;img alt=&quot;MSDN site - more details&quot; border=&quot;0&quot; height=&quot;20&quot; src=&quot;http://www.visualize.uk.com/images/MSDN.gif&quot; width=&quot;40&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;            &lt;td&gt;Exception Class&lt;/td&gt;           &lt;td&gt;Pascal with &quot;Exception&quot; suffix&lt;/td&gt;           &lt;td&gt;WebException, SMSException&lt;/td&gt;           &lt;td&gt;&amp;nbsp;&lt;/td&gt;           &lt;td&gt;              &lt;div align=&quot;center&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;            &lt;td&gt;Event&lt;/td&gt;           &lt;td&gt;Pascal plus optional &quot;EventHandler&quot; suffix where relevant&lt;/td&gt;           &lt;td&gt;btnSubmit_Click, Painting, Click, Clicked, MyEventHandler&lt;/td&gt;           &lt;td&gt;VS uses underscores to separate an object from its event. Be careful              with tense (pre/past), e.g. a Close event that can be canceled should              have a Closing event and a Closed event. MS also recommend adding              the &quot;EventHandler&quot; suffix where thought needed.&lt;/td&gt;           &lt;td&gt;              &lt;div align=&quot;center&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconeventnamingguidelines.asp&quot;&gt;&lt;img alt=&quot;MSDN site - more details&quot; border=&quot;0&quot; height=&quot;20&quot; src=&quot;http://www.visualize.uk.com/images/MSDN.gif&quot; width=&quot;40&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;Note that acronym parts of phrases may be all in uppercase (e.g. SMSMessage)          where relevant.&lt;br /&gt;
User interface objects (text boxes, drop down lists etc) are treated          as a special case and discussed in the next section.&lt;br /&gt;
&lt;h3&gt;User Interface Objects and Controls&lt;/h3&gt;The Microsoft .Net guidelines do not go into detail on the naming of          user interface objects (again probably because they are only objects after          all), but one approach that is well adopted is the use of the &quot;control          type&quot; prefix convention (similar to hungarian style often used in          VB, C++ etc). Although this should &lt;strong&gt;not&lt;/strong&gt; be used for indicating          variable types, it is useful for user interface controls as it makes it          explicitly clear where user interface elements are in your code. &lt;br /&gt;
Some samples are below for ASP.Net web form controls:&lt;br /&gt;
&lt;table border=&quot;1&quot; cellspacing=&quot;0&quot; class=&quot;txtBlackSmall&quot; summary=&quot;layout table for web controls&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;            &lt;td width=&quot;22%&quot;&gt;&lt;strong&gt;Control&lt;/strong&gt;&lt;/td&gt;           &lt;td width=&quot;34%&quot;&gt;&lt;strong&gt;Prefix&lt;/strong&gt;&lt;/td&gt;           &lt;td width=&quot;44%&quot;&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td&gt;Label&lt;/td&gt;           &lt;td&gt;lbl&lt;/td&gt;           &lt;td&gt;lblSurname&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td&gt;TextBox&lt;/td&gt;           &lt;td&gt;txt&lt;/td&gt;           &lt;td&gt;txtSurname&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td&gt;DataGrid&lt;/td&gt;           &lt;td&gt;dg&lt;/td&gt;           &lt;td&gt;dgResults&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td&gt;Button&lt;/td&gt;           &lt;td&gt;btn&lt;/td&gt;           &lt;td&gt;btnSave&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td&gt;ImageButton&lt;/td&gt;           &lt;td&gt;ibtn&lt;/td&gt;           &lt;td&gt;ibtnSave&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td&gt;Hyperlink&lt;/td&gt;           &lt;td&gt;lnk&lt;/td&gt;           &lt;td&gt;lnkHomePage&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;DropDownList&lt;/td&gt;           &lt;td&gt;ddl&lt;/td&gt;           &lt;td&gt;ddlCompany&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;ListBox&lt;/td&gt;           &lt;td&gt;lst&lt;/td&gt;           &lt;td&gt;lstCompany&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;DataList&lt;/td&gt;           &lt;td&gt;dlst&lt;/td&gt;           &lt;td&gt;dlstAddress&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;Repeater&lt;/td&gt;           &lt;td&gt;rep&lt;/td&gt;           &lt;td&gt;repSection&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;Checkbox&lt;/td&gt;           &lt;td&gt;chk&lt;/td&gt;           &lt;td&gt;chkMailList&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;CheckBoxList&lt;/td&gt;           &lt;td&gt;chk&lt;/td&gt;           &lt;td&gt;chkAddress&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;RadioButton&lt;/td&gt;           &lt;td&gt;rdo&lt;/td&gt;           &lt;td&gt;rdoSex&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;RadioButtonList&lt;/td&gt;           &lt;td&gt;rdo&lt;/td&gt;           &lt;td&gt;rdoAgeGroup&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;Image&lt;/td&gt;           &lt;td&gt;img&lt;/td&gt;           &lt;td&gt;imgLogo&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;Panel&lt;/td&gt;           &lt;td&gt;pan&lt;/td&gt;           &lt;td&gt;panSection&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;PlaceHolder&lt;/td&gt;           &lt;td&gt;plh&lt;/td&gt;           &lt;td&gt;plhHeader&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;Calender&lt;/td&gt;           &lt;td&gt;cal&lt;/td&gt;           &lt;td&gt;calMyDate&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;Adrotator&lt;/td&gt;           &lt;td&gt;adr&lt;/td&gt;           &lt;td&gt;adrBanner&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;Table&lt;/td&gt;           &lt;td&gt;tbl&lt;/td&gt;           &lt;td&gt;tblResults&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;[All] Validators&lt;/td&gt;           &lt;td&gt;val&lt;/td&gt;           &lt;td&gt;valCreditCardNumber&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;ValidationSummary&lt;/td&gt;           &lt;td&gt;vals&lt;/td&gt;           &lt;td&gt;valsErrors&lt;/td&gt;         &lt;/tr&gt;
&lt;tr&gt;            &lt;td height=&quot;23&quot;&gt;&amp;nbsp;&lt;/td&gt;           &lt;td&gt;&amp;nbsp;&lt;/td&gt;           &lt;td&gt;&amp;nbsp;&lt;/td&gt;         &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;Namespaces&lt;/h3&gt;All namespace should use Pascal casing and be prefixed with your company          (and department if you wish). See examples below:&lt;br /&gt;
Sample &quot;project level&quot; namespaces:&lt;br /&gt;
&lt;blockquote&gt;          &lt;strong&gt;YourCompany.YourDept.YourProject&lt;br /&gt;
Visualize.Blog&lt;/strong&gt;&lt;br /&gt;
&lt;/blockquote&gt;Generic reusable routines, classes etc which will be used across projects,          can sit at the &#39;company&#39; or &#39;dept&#39; level, for example:&lt;br /&gt;
&lt;blockquote&gt;          &lt;strong&gt;Visualize.Utils&lt;/strong&gt;&lt;br /&gt;
&lt;/blockquote&gt;&lt;h3&gt;Commenting Code&lt;/h3&gt;Code should be commented where necessary and C# XML commenting tags used,          to aid VS intellisense, object browsing and on-line documentation generation          if needed. Example: some sample C# source is given below for a method          in an SMS tool I developed recently:&lt;br /&gt;
&lt;blockquote&gt;          &lt;span style=&quot;color: blue; font-family: Courier New,Courier,mono;&quot;&gt;///            &lt;/span&gt;&lt;br /&gt;
&lt;summary&gt;&lt;span style=&quot;color: blue; font-family: Courier New,Courier,mono;&quot;&gt;&lt;br /&gt;
/// SendSMSMessage sends a text message to a valid mobile number&lt;br /&gt;
/// &lt;/span&gt;&lt;/summary&gt;&lt;span style=&quot;color: blue; font-family: Courier New,Courier,mono;&quot;&gt;&lt;br /&gt;
/// &lt;param name=&quot;mobileNo&quot; /&gt;Mobile number to send to            in format +44 1234 112233&lt;br /&gt;
/// &lt;param name=&quot;message&quot; /&gt;Message itself, max 160 chars&lt;br /&gt;
/// &lt;returns&gt;Message result string from gateway&lt;/returns&gt;&lt;br /&gt;
public string SendSMSMessage(string mobileNo,string message) &lt;br /&gt;
{&lt;/span&gt;&lt;span style=&quot;font-family: Courier New,Courier,mono;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span&gt;// rest of code here...&lt;/span&gt; &lt;br /&gt;
&lt;/blockquote&gt;Full details of more XML tags can be found in the Visual Studio.Net on-line          help.</content><link rel='replies' type='application/atom+xml' href='http://jairoxz.blogspot.com/feeds/3904617114673530942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5095462228187295903/3904617114673530942' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/3904617114673530942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5095462228187295903/posts/default/3904617114673530942'/><link rel='alternate' type='text/html' href='http://jairoxz.blogspot.com/2011/07/resources-aspnet-coding-standards.html' title='Resources - ASP.Net Coding Standards'/><author><name>jairox&#39;z</name><uri>http://www.blogger.com/profile/12527272468004437025</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>