<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel xmlns:blog="http://www.dotnetnuke.com/blog/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
    <title>Michael Seirer</title>
    <description>Sargolas geeky stuff</description>
    <link>http://www.code4ward.net/main/Blog/tabid/70/BlogId/8/Default.aspx</link>
    <language>en-US</language>
    <webMaster />
    <pubDate>Thu, 17 May 2012 06:29:36 GMT</pubDate>
    <lastBuildDate>Thu, 17 May 2012 06:29:36 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 4.1.0.0</generator>
    <item>
      <title>Royal TS V2: &amp;ldquo;Properties&amp;rdquo; and &amp;ldquo;Notes&amp;rdquo; panel</title>
      <link>http://www.code4ward.net/main/Blog/tabid/70/EntryId/126/Royal-TS-V2-ldquo-Properties-rdquo-and-ldquo-Notes-rdquo-panel.aspx</link>
      <description>&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	In the this blog post we want to draw your attention to some “not-so-super-exciting” panels – but they still have some nice hidden features: the properties panel and the notes panel.&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	&lt;b&gt;&lt;font size="3"&gt;To Show or not to show&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
	By default when you start Royal TS V2 the properties panel as well as the notes panel is not visible. To show them click in the Ribbon on “Other Panels” (or use “F4” as shortcut for the properties panel).&lt;/p&gt;
&lt;p&gt;
	Both panels can be docked to the edges (default) or tabbed in the tab bar.&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/126/Windows-Live-Writer-Royal-TS-V2-Properties-and-Notes-panel_9C1C-image_2.png"&gt;&lt;img alt="image" src="/main/Portals/0/Blog/Files/10/126/Windows-Live-Writer-Royal-TS-V2-Properties-and-Notes-panel_9C1C-image_thumb.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; width: 500px; height: 343px; " title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	As you see in the center of the picture above you can work in the same way as with any advanced docking framework you might know and love.&lt;/p&gt;
&lt;p&gt;
	Additionally you can have them as floating child windows (you get this with drag n drop or with double-clicking the title bar)&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/126/Windows-Live-Writer-Royal-TS-V2-Properties-and-Notes-panel_9C1C-image_4.png"&gt;&lt;img alt="image" border="0" height="335" src="/main/Portals/0/Blog/Files/10/126/Windows-Live-Writer-Royal-TS-V2-Properties-and-Notes-panel_9C1C-image_thumb_1.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; " title="image" width="350" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	When docked to the edges you can also use the pin glyph to auto-hide them.&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	&lt;b&gt;The properties panel&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
	The properties panel shows … you guessed it! … the properties of a selected object. Besides some meta-data like “Created”, “Created by”, “Modified” and “Modified by” this panel shows its most usefulness when showing properties of connections or tasks. Everything (and more) that you can manipulate through the UI is shown here also. The data shown is read-only though.&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	&lt;b&gt;5 Tips to work with the properties panel&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
	Since especially in the case of connection objects, the amount of data shown is huge. To work more efficiently with it you can&lt;/p&gt;
&lt;p&gt;
	1. Click on the header „Property Name” or “Value” to &lt;strong&gt;sort view&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	2. Double-click on any row to &lt;strong&gt;copy the value in the clipboard&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	3. Press &lt;strong&gt;CRTL-F&lt;/strong&gt; and enter a string – the panel content is then filtered&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/126/Windows-Live-Writer-Royal-TS-V2-Properties-and-Notes-panel_9C1C-image_8.png"&gt;&lt;img alt="image" src="/main/Portals/0/Blog/Files/10/126/Windows-Live-Writer-Royal-TS-V2-Properties-and-Notes-panel_9C1C-image_thumb_3.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; width: 350px; height: 275px; " title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	4. Right-click on any row – this especially allows you to &lt;strong&gt;edit the selected object&lt;/strong&gt; (not the specific property)&lt;/p&gt;
&lt;p&gt;
	5. If you click on a pre/post connection task you have&lt;strong&gt; “Execute” in the context menu&lt;/strong&gt; and can directly execute the task!&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/126/Windows-Live-Writer-Royal-TS-V2-Properties-and-Notes-panel_9C1C-image_14.png"&gt;&lt;img alt="image" src="/main/Portals/0/Blog/Files/10/126/Windows-Live-Writer-Royal-TS-V2-Properties-and-Notes-panel_9C1C-image_thumb_6.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; width: 500px; height: 133px; " title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	6. If you right click on any Custom Field (1 to 10) you have the &lt;strong&gt;“Execute” menu &lt;/strong&gt;enabled as well. So if you entered a URL it is opened in the default browser. This is quite handy if you store e.g. web interfaces to admin websites. And of course it works with commands as well (as in the screenshot you can see “cmd.exe” in Custom Field 1)&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/126/Windows-Live-Writer-Royal-TS-V2-Properties-and-Notes-panel_9C1C-image_10.png"&gt;&lt;img alt="image" src="/main/Portals/0/Blog/Files/10/126/Windows-Live-Writer-Royal-TS-V2-Properties-and-Notes-panel_9C1C-image_thumb_4.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; width: 400px; height: 295px; " title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	&lt;b&gt;&lt;font size="3"&gt;The notes panel&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
	For any selected object (any connection, task, credential, folder, document – even the application document - you can attach some notes to it. Click “Edit Notes” to bring up the rich text popup (which might take a little bit of time for the first time you launch it).&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	If you attach notes in the Application document they get saved automatically, for all other documents you have to save them for yourself.&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	Cheers,&lt;/p&gt;
&lt;p&gt;
	Michael&lt;/p&gt;
</description>
      <author />
      <comments>http://www.code4ward.net/main/Blog/tabid/70/EntryId/126/Royal-TS-V2-ldquo-Properties-rdquo-and-ldquo-Notes-rdquo-panel.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://www.code4ward.net/main/Blog/tabid/70/EntryId/126/Royal-TS-V2-ldquo-Properties-rdquo-and-ldquo-Notes-rdquo-panel.aspx</guid>
      <pubDate>Tue, 08 Nov 2011 10:13:00 GMT</pubDate>
      <trackback:ping>http://www.code4ward.netDesktopModules/BlogTrackback.aspx?id=126</trackback:ping>
    </item>
    <item>
      <title>Royal TS V2: How to import CSV files</title>
      <link>http://www.code4ward.net/main/Blog/tabid/70/EntryId/123/Royal-TS-V2-How-to-import-CSV-files.aspx</link>
      <description>&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	&lt;br /&gt;
	In this blog post we want to show you how you can import data from CSV files and create connections, web pages, tasks and credentials in a very dynamic way. There are many ways to get data dumped to a CSV file (export from some Excel sheet, from a CMDB or maybe even create one via some script).&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	First of all fire up Royal TS V2 and &lt;strong&gt;make sure you have an open document&lt;/strong&gt; where you want to import the CSV data into. Then select “File” from the Ribbon and click on “Import” and then “CSV File”:&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_2.png"&gt;&lt;img alt="image" border="0" height="286" src="/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_thumb.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; " title="image" width="300" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	In the “Object Type” dropdown you can &lt;b&gt;select one of the supported types&lt;/b&gt; (at the moment you can create Remote Desktop Connections, Web Connections, Tasks and Credentials). Additionally you have to specify the path to the CSV file.&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_4.png"&gt;&lt;img alt="image" src="/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_thumb_1.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; width: 400px; height: 370px; " title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	After clicking on “Next” you &lt;b&gt;specify the separator&lt;/b&gt; (coma, semi color or tab) and if the&lt;b&gt; &lt;/b&gt;given file&lt;b&gt; contains column headers&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	With the “Update Preview” button you can check upfront if Royal TS V2 can successfully open and parse the file with the given context:&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_6.png"&gt;&lt;img alt="image" src="/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_thumb_2.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; width: 400px; height: 370px; " title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	In the next page of the wizard you &lt;b&gt;specify the mappings&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_8.png"&gt;&lt;img alt="image" src="/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_thumb_3.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; width: 400px; height: 370px; " title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	In the left dropdown column you define object properties of the generated object (in our case a Remote Desktop Connection). In the dropdown you will find all supported properties. Note that the field “URI” is the umbrella term for the field “Computer name” for Remote Desktop Connections and “URL” for Web Connections.&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	In the right dropdown column you find the list of variables that will be dynamically filled by values from the CSV.&lt;/p&gt;
&lt;p&gt;
	If you want add another mapping definition, use the “Add Mapping” button. Also you can remove any defined mapping with clicking on the “x” right next to it.&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	For example consider the content of the following CSV file (which was used to create the screenshots as well):&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;blockquote style="background-color: rgb(255, 255, 255); "&gt;
	&lt;p&gt;
		&lt;font face="Courier New"&gt;Computer,Type,Description,CV1,CSVPassword,ConnectToConsole,ColorDepth,InventaryNumber&lt;/font&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote style="background-color: rgb(255, 255, 255); "&gt;
	&lt;p&gt;
		&lt;font face="Courier New"&gt;DCOM206,ComputerD,d1,custom field 1,pwd1,true,16,10032&lt;/font&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote style="background-color: rgb(255, 255, 255); "&gt;
	&lt;p&gt;
		&lt;font face="Courier New"&gt;OM212,ComputerO,d2,custom field 2,pwd2,abc,9,102390&lt;/font&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	This will result in variables like $Computer$, $Type$ etc.&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_28.png"&gt;&lt;img alt="image" src="/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_thumb_13.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; width: 400px; height: 185px; " title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	After specifying all properties that are relevant for you please click “Next”.&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_12.png"&gt;&lt;img alt="image" src="/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_thumb_5.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; width: 500px; height: 463px; " title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	In the last step of the wizard you define where to put the imported objects (which document and folder). After clicking “OK” the wizard is finished and you can work with your objects.&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	Now I want to give you some more advanced tips on how to use the CSV import dialog.&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	&lt;b&gt;&lt;font size="3"&gt;CSV Import Tip 1: Bulk-edit after import&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
	If you forget to specify some common element e.g. like Color Depth should be 16bit you can always select all imported objects and bulk-edit them. Just select the destination document and in the Dashboard select all imported objects.&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_14.png"&gt;&lt;img alt="image" src="/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_thumb_6.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; width: 500px; height: 133px; " title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	Then click on “Properties” in the Ribbon or from the context menu.&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_16.png"&gt;&lt;img alt="image" src="/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_thumb_7.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; width: 500px; height: 368px; " title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	In the properties pages then you see that the controls are disabled. Click “Override” and then e.g. “Color Depth”. This way you can overwrite the property for all selected objects with a simple click.&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	&lt;b&gt;&lt;font size="3"&gt;CSV Import Tip 2: Adapt the template before importing&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	Having the ability to specify all possible properties during the import is a very mighty feature. But usability-wise it is easier to have a nice UI for this. New Connections (Remote Desktop Connections and Web Connections for the time being) are created with values based on the template that is specified in the Application.&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_18.png"&gt;&lt;img alt="image" border="0" height="303" src="/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_thumb_8.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; " title="image" width="230" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	All properties you set here are used for new connections. So adapt the template to your liking and then import from the CSV.&lt;/p&gt;
&lt;p&gt;
	Remark : in the current build (2.00.00.11020) we do have a bug regarding this templating mechanism. We are aware of it and will have it solved soon.&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	&lt;b&gt;&lt;font size="3"&gt;CSV Import Tip 3: Fun with variables&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	As we have explained the columns of the CSV translate to variables you can use for the import:&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_20.png"&gt;&lt;img alt="image" src="/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_thumb_9.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; width: 500px; height: 463px; " title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	In the example above the Color Depth of the new objects will be set to the values from the CSV under the colum “ColorDepth”.&lt;/p&gt;
&lt;p&gt;
	But you can do even more flexible stuff:&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_22.png"&gt;&lt;img alt="image" src="/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_thumb_10.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; width: 500px; height: 463px; " title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	In the previous screenshot we want to set the “Description” field from the newly imported connection to a value that combines two values from the CSV. RoyalTS will expand “$InventaryNumber$-$Computer$” to the correct data from the CSV.&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	&lt;b&gt;&lt;font size="3"&gt;CSV Import Tip 4: Specify fixed values for all imported connections&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	You can easily specify a fixed value to any property that will be applied automatically to all connections. Remark: for Boolean values its “true” and “false”.&lt;/p&gt;
&lt;p&gt;
	E.g. we want to set the feature “Use Multiple Monitors in Full Screen Mode” via the import mapping, you simply type “true” instead of using a variable from the dropdown:&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_24.png"&gt;&lt;img alt="image" src="/main/Portals/0/Blog/Files/10/123/Windows-Live-Writer-Royal-TS-V2-How-to-import-CSV-files_CCDF-image_thumb_11.png" style="background-image: none; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; border-left-width: 0px; border-left-style: initial; border-left-color: initial; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-top-style: initial; border-top-color: initial; border-right-width: 0px; border-right-style: initial; border-right-color: initial; padding-top: 0px; width: 500px; height: 463px; " title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	Cheers,&lt;/p&gt;
&lt;p&gt;
	Michael&lt;/p&gt;
</description>
      <author />
      <comments>http://www.code4ward.net/main/Blog/tabid/70/EntryId/123/Royal-TS-V2-How-to-import-CSV-files.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://www.code4ward.net/main/Blog/tabid/70/EntryId/123/Royal-TS-V2-How-to-import-CSV-files.aspx</guid>
      <pubDate>Thu, 03 Nov 2011 14:06:00 GMT</pubDate>
      <trackback:ping>http://www.code4ward.netDesktopModules/BlogTrackback.aspx?id=123</trackback:ping>
    </item>
    <item>
      <title>Royal TS V2: How to import my previous Royal TS 1.x file</title>
      <link>http://www.code4ward.net/main/Blog/tabid/70/EntryId/120/Royal-TS-V2-How-to-import-my-previous-Royal-TS-1-x-file.aspx</link>
      <description>&lt;p&gt;Royal TS V2 will introduce a plethora of new features but at the same time supports the old file format from Royal TS V1.x. We made sure that you can migrate to our new V2 version seamlessly and without any issues.&lt;/p&gt;  &lt;p&gt;Basically there are&lt;strong&gt; &lt;/strong&gt;two ways to work with the .rts files: you either &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;import&lt;/strong&gt; &lt;strong&gt;the file &lt;/strong&gt;(more control about where to store the connections and if tasks should be imported) or you &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;just open the file&lt;/strong&gt;. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Importing Royal TS V1.x files&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Click in the Ribbon on "File" and in the Backstage area on "Import". This shows you the possible files Royal TS V2 can import at the moment: RDP File, CSV File and RTS File. RDP and CSV file imports are topic for another blog post - so stay tuned.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_thumb.png" width="415" height="396" /&gt;&lt;/a&gt;&lt;/p&gt;      &lt;p&gt; &lt;/p&gt;  &lt;p&gt;After selecting the "RTS File" option you enter a wizard that helps you defining how to import the Royal TS 1.x file.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_thumb_1.png" width="576" height="533" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;You have to specify the path to the Royal TS 1.x file. Optionally you can define to import the Task Definitions (if any) from the Royal TS 1.x definitions. Tasks in Royal TS 1.x were stored in a separate document inside your Application Data directory. If you have spent a lot of time to maintain and set up your tasks this is a good way to seamlessly work with the same Task Definitions in the new version. Now click “Next”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_6.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_thumb_2.png" width="576" height="533" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;In the next step of the wizard you can specify the document and path where to import the Royal TS 1.x file. In our example we have only one document open (“code4ward Systems”). So it is required that you have a document open already where you can import the old file into. As import destination you can also specify a specific folder (in the screenshot above you can see that “Connections” is selected as destination folder).&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;After clicking “OK” you get a small confirmation message box:&lt;/p&gt;    &lt;p&gt;&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_8.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_thumb_3.png" width="399" height="132" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;If you have opted for importing the Task Definitions from the old file you can find them now in a new folder “Imported Tasks” under the root of the selected document or folder. In our case they are located at “code4ward systems” -&gt; “Connections” -&gt; “Imported Tasks”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_10.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_thumb_4.png" width="235" height="328" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;After importing you find also an entry in the Log about your import:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_12.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_thumb_5.png" width="604" height="282" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;    &lt;h4&gt;&lt;font style="font-weight: bold"&gt;Opening RTS files&lt;/font&gt;&lt;/h4&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;We have spent quite some time to make our document structure internally forward- and backwards-compatible. So you can safely open V1.x files in the Royal TS V2 directly and it will get converted in place. Just open V1.x files as you would open V2 files:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_14.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_thumb_6.png" width="265" height="458" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Click “Open” in the Ribbon Toolbar and make sure, you select “Royal TS 1 Files (*.rts)” in the filter.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_16.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_thumb_7.png" width="604" height="349" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;After clicking “Open” Royal TS V2 converts the document to the new V2 format. You get notified with a message box that the new document was saved immediately with the same name but the &lt;b&gt;new *.rtsx&lt;/b&gt; filename extension.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_18.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_thumb_8.png" width="604" height="76" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;After confirming you can start working directly with your connections in V2! Task Definitions have been imported automatically for you. Note that in this case you don’t need to have a document open before you start because opening the old file will automatically create a new document for you.&lt;/p&gt;  &lt;p&gt;The Log view in V2 will also have two new entries: one for Opening the V1.x file, one for the automatic save in the V2 format that happened. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_20.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="/main/Portals/0/Blog/Files/10/120/Windows-Live-Writer-f720f77040dc_F2EC-image_thumb_9.png" width="604" height="326" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;a href=http://www.code4ward.net/main/Blog/tabid/70/EntryId/120/Royal-TS-V2-How-to-import-my-previous-Royal-TS-1-x-file.aspx&gt;More ...&lt;/a&gt;</description>
      <author />
      <comments>http://www.code4ward.net/main/Blog/tabid/70/EntryId/120/Royal-TS-V2-How-to-import-my-previous-Royal-TS-1-x-file.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://www.code4ward.net/main/Blog/tabid/70/EntryId/120/Royal-TS-V2-How-to-import-my-previous-Royal-TS-1-x-file.aspx</guid>
      <pubDate>Mon, 31 Oct 2011 16:17:28 GMT</pubDate>
      <trackback:ping>http://www.code4ward.netDesktopModules/BlogTrackback.aspx?id=120</trackback:ping>
    </item>
    <item>
      <title>SmtpClient, MailMessage and IDisposable</title>
      <link>http://www.code4ward.net/main/Blog/tabid/70/EntryId/92/SmtpClient-MailMessage-and-IDisposable.aspx</link>
      <description>&lt;p&gt;Today I trippled over a very interesting change between .NET 3.5 and .NET 4.0:&lt;/p&gt;
&lt;p&gt;I conducted a code review and found the following code:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 600px; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; height: 166px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px"&gt;
&lt;div id="codeSnippet" style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; var message = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; MailMessage();&lt;/pre&gt;
&lt;!--{13019929345770}--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; message.From = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; MailAddress(&lt;span style="color: #006080"&gt;"..."&lt;/span&gt;);&lt;/pre&gt;
&lt;!--{13019929345771}--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt; message.To.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; MailAddress(&lt;span style="color: #006080"&gt;"..."&lt;/span&gt;));&lt;/pre&gt;
&lt;!--{13019929345772}--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt; message.Subject = &lt;span style="color: #006080"&gt;"..."&lt;/span&gt;;&lt;/pre&gt;
&lt;!--{13019929345773}--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt; message.Body = &lt;span style="color: #006080"&gt;"..."&lt;/span&gt;;&lt;/pre&gt;
&lt;!--{13019929345774}--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--{13019929345775}--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt; var client = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SmtpClient(&lt;span style="color: #006080"&gt;"host"&lt;/span&gt;);&lt;/pre&gt;
&lt;!--{13019929345776}--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt; client.Send(message);&lt;/pre&gt;
&lt;!--{13019929345777}--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I remembered to use &lt;font face="Courier New"&gt;SmtpClient&lt;/font&gt; in a using statement to trigger &lt;font face="Courier New"&gt;IDisposable&lt;/font&gt; properly. But to my great surprise I found out, that &lt;strong&gt;in .NET 3.5 SmtpClient doesn’t implement IDisposable, in .NET 4.0 it does!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;This is especially interesting because you don’t get any compiler notice if you migrate from 3.5 to 4.0…&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Though, if you have enabled FxCop running (Enable Code Analysis on Build) even with the smallest set of rules from Microsoft they do give you the hint to use usig:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/8/92/Windows-Live-Writer-SmtpClient-MailMessage-and-IDisposable_7DF5-Capture.jpg"&gt;&lt;img title="Capture" border="0" alt="Capture" width="600" height="134" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" src="/main/Portals/0/Blog/Files/8/92/Windows-Live-Writer-SmtpClient-MailMessage-and-IDisposable_7DF5-Capture_thumb.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;Btw: MailMessage&lt;/font&gt; is implementing &lt;font face="Courier New"&gt;IDisposable&lt;/font&gt; in 3.5 and 4.0.&lt;/p&gt;</description>
      <author />
      <comments>http://www.code4ward.net/main/Blog/tabid/70/EntryId/92/SmtpClient-MailMessage-and-IDisposable.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://www.code4ward.net/main/Blog/tabid/70/EntryId/92/SmtpClient-MailMessage-and-IDisposable.aspx</guid>
      <pubDate>Thu, 20 Jan 2011 10:45:49 GMT</pubDate>
      <trackback:ping>http://www.code4ward.netDesktopModules/BlogTrackback.aspx?id=92</trackback:ping>
    </item>
    <item>
      <title>Fun with the ternary operator ?, Nullable types and object initializers</title>
      <link>http://www.code4ward.net/main/Blog/tabid/70/EntryId/91/Fun-with-the-ternary-operator-Nullable-types-and-object-initializers.aspx</link>
      <description>&lt;p&gt;lets start with a simple class for demonstration purposes – note, that the DateOfBirth is nullable …&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 600px; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; height: 118px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px"&gt;
&lt;div id="codeSnippet" style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Person&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Name { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; DateTime? DateOfBirth { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;using object initializers, we can instantiate the class in the following way:&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 600px; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; height: 70px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px"&gt;
&lt;div id="codeSnippet" style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000"&gt;// works&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; Person p1 = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Person() { Name=&lt;span style="color: #006080"&gt;"Michi"&lt;/span&gt;, DateOfBirth=DateTime.Now };&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;but what happens, &lt;strong&gt;if we want to do the initialize the values based on some condition&lt;/strong&gt;? you could be tempted to write the following code:&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 600px; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; height: 166px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px"&gt;
&lt;div id="codeSnippet" style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000"&gt;// doesnt compile&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; &lt;span style="color: #008000"&gt;// Type of conditional expression cannot be determined because there is no implicit conversion between '&lt;null&gt;&lt;/null&gt;'&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; someCondition = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt; Person p2 = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Person()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;     Name = &lt;span style="color: #006080"&gt;"Michi"&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;     DateOfBirth = (someCondition == &lt;span style="color: #0000ff"&gt;true&lt;/span&gt; ? &lt;span style="color: #0000ff"&gt;null&lt;/span&gt; : DateTime.Now)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt; };&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;boom!&lt;/strong&gt; you get a compile error:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.code4ward.net/main/Portals/0/Blog/Files/8/91/Windows-Live-Writer-7cdb8de946cb_A16F-compile_error.jpg"&gt;&lt;img title="compile_error" border="0" alt="compile_error" width="600" height="75" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" src="/main/Portals/0/Blog/Files/8/91/Windows-Live-Writer-7cdb8de946cb_A16F-compile_error_thumb.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;interestingly enough, an assignment from null to DateTime? is working!&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 600px; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; height: 150px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px"&gt;
&lt;div id="codeSnippet" style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000"&gt;// but this works...&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; Person p3 = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Person();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt; p3.Name = &lt;span style="color: #006080"&gt;"Michi"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(someCondition == &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;     p3.DateOfBirth = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;     p3.DateOfBirth = DateTime.Now;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;hmmm… so how do we get to use object initializers for elegante syntax but still are able to assign nullable types? fallback to the “real” type&lt;/p&gt;
&lt;p&gt;that is used behind the scenes if you declare a DateTime? – it’s an instance of the System.Nullable struct – see &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/1t3y8s4s(v=vs.80).aspx"&gt;Nullable Types C# on MSDN&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;so here is the working code:&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 600px; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; height: 134px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px"&gt;
&lt;div id="codeSnippet" style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000"&gt;// in order to still use object intializers you can use the "real" type of DateTime?&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; Person p4 = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Person()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;     Name = &lt;span style="color: #006080"&gt;"Michi"&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;     DateOfBirth = (someCondition == &lt;span style="color: #0000ff"&gt;true&lt;/span&gt; ? &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Nullable&lt;datetime&gt;&lt;/datetime&gt;() : DateTime.Now)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt; };&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;</description>
      <author />
      <comments>http://www.code4ward.net/main/Blog/tabid/70/EntryId/91/Fun-with-the-ternary-operator-Nullable-types-and-object-initializers.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://www.code4ward.net/main/Blog/tabid/70/EntryId/91/Fun-with-the-ternary-operator-Nullable-types-and-object-initializers.aspx</guid>
      <pubDate>Wed, 05 Jan 2011 10:48:32 GMT</pubDate>
      <trackback:ping>http://www.code4ward.netDesktopModules/BlogTrackback.aspx?id=91</trackback:ping>
    </item>
    <item>
      <title>new homepage www.sargola.com</title>
      <link>http://www.code4ward.net/main/Blog/tabid/70/EntryId/90/new-homepage-www-sargola-com.aspx</link>
      <description>&lt;p&gt;just sent my old homepage into retirement and created a fresh one with flavors.me – kinda neat to configure and flexible enough for me to make a nice hub of my digital activities. nothing more, nothing less – enjoy &lt;a href="http://www.sargola.com" target="_blank"&gt;www.sargola.com&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;a href=http://www.code4ward.net/main/Blog/tabid/70/EntryId/90/new-homepage-www-sargola-com.aspx&gt;More ...&lt;/a&gt;</description>
      <author />
      <comments>http://www.code4ward.net/main/Blog/tabid/70/EntryId/90/new-homepage-www-sargola-com.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://www.code4ward.net/main/Blog/tabid/70/EntryId/90/new-homepage-www-sargola-com.aspx</guid>
      <pubDate>Sun, 02 Jan 2011 22:57:19 GMT</pubDate>
      <trackback:ping>http://www.code4ward.netDesktopModules/BlogTrackback.aspx?id=90</trackback:ping>
    </item>
  </channel>
</rss>
