<?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: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-1715602486003939396</id><updated>2011-12-30T12:40:59.469-08:00</updated><title type='text'>My 2 Cents</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://arundomized.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://arundomized.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Arunprakash</name><uri>http://www.blogger.com/profile/04284179691611860787</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1715602486003939396.post-1873508794948688926</id><published>2008-06-08T22:51:00.000-07:00</published><updated>2008-06-08T22:56:16.813-07:00</updated><title type='text'>1. Documentation for Entity Framework</title><content type='html'>The latest release of entity framework, as most of us know, is in the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=8C36ACA4-E947-4760-9B05-93CAC04C6F87&amp;displaylang=en"&gt;.Net 3.5 SP1 Beta&lt;/a&gt; release. The documentation for this can be found at &lt;a href="http://vs2008sp1docs.msdn.microsoft.com/en-us/ms439005.aspx"&gt;http://vs2008sp1docs.msdn.microsoft.com/en-us/ms439005.aspx&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1715602486003939396-1873508794948688926?l=arundomized.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arundomized.blogspot.com/feeds/1873508794948688926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1715602486003939396&amp;postID=1873508794948688926' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/1873508794948688926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/1873508794948688926'/><link rel='alternate' type='text/html' href='http://arundomized.blogspot.com/2008/06/1-documenttion-for-entity-framework.html' title='1. Documentation for Entity Framework'/><author><name>Arunprakash</name><uri>http://www.blogger.com/profile/04284179691611860787</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1715602486003939396.post-5913931101363797226</id><published>2007-12-08T10:36:00.000-08:00</published><updated>2008-05-04T11:49:33.790-07:00</updated><title type='text'>Sorting a Generic List of custom type objects in a one-liner - C#</title><content type='html'>Do I love the new features in C# 3.0!! Here is a sample. Imagine the days of implementing an IComparable or an IComparer on your custom type so they become 'sortable'. Compare that with the one-liner below :)&lt;br /&gt;&lt;br /&gt;(Assume there is a class called opportunity that has a property called Properties, which returns a value type based on a column name and that there exist methods to give what column the user clicked on and what order did he want)&lt;br /&gt;&lt;br /&gt;List&lt;opportunities&gt; = GetOpportunityList();&lt;br /&gt;int ascending = GetOrder(); // This method will return 1 if ascending and -1 if&lt;br /&gt;// descending&lt;br /&gt;string columnName = GetSortedColumn(); // Get the name of the column to be sorted&lt;br /&gt;&lt;br /&gt;// One-liner sort&lt;br /&gt;&lt;strong&gt;opportunities.Sort((a, b) =&gt; ascending * ((IComparable)a.Properties         [columnName] ).CompareTo(b.Properties[columnName]));&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Isnt this real simple? Now, the additional benefit that we get out of this is the ability to pass in local variables (ascending and columnName in this case) into the lambda expression and thereby the comparison, which would have never been possible if I used the "implementing IComparable or IComparer" route.&lt;br /&gt;&lt;br /&gt;Happy Linqing!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1715602486003939396-5913931101363797226?l=arundomized.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arundomized.blogspot.com/feeds/5913931101363797226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1715602486003939396&amp;postID=5913931101363797226' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/5913931101363797226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/5913931101363797226'/><link rel='alternate' type='text/html' href='http://arundomized.blogspot.com/2007/12/sorting-list-of-custom-type-in-one-line.html' title='Sorting a Generic List of custom type objects in a one-liner - C#'/><author><name>Arunprakash</name><uri>http://www.blogger.com/profile/04284179691611860787</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1715602486003939396.post-4023812253156121982</id><published>2007-07-05T17:19:00.001-07:00</published><updated>2007-07-05T17:21:37.018-07:00</updated><title type='text'>Host ActiveX controls in Managed World</title><content type='html'>&lt;p&gt;&amp;nbsp;&amp;nbsp; Recently I embarked into the exercise of hosting some ActiveX controls inside of a windows form. Found out that&amp;nbsp; &lt;a href="http://msdn2.microsoft.com/en-us/library/8ccdh774(VS.80).aspx"&gt;AxImp.exe&lt;/a&gt;&amp;nbsp;was the way to go. Its a neat tool using which you can&amp;nbsp;create a wrapper for the ActiveX control as a dll or as a C# file. After you create the wrapper for the ActiveX control as a C# file (emitted as a Winform user control that derives from AxHost), you can add attributes on the control to make it appear in toolbox. I tried this to host the Outlook&amp;nbsp;List View control in a winform. Works like a charm :)&amp;nbsp;More details on the usage of the tool can be found &lt;a href="http://msdn2.microsoft.com/en-us/library/8ccdh774(VS.80).aspx"&gt;here&lt;/a&gt;. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1715602486003939396-4023812253156121982?l=arundomized.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arundomized.blogspot.com/feeds/4023812253156121982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1715602486003939396&amp;postID=4023812253156121982' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/4023812253156121982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/4023812253156121982'/><link rel='alternate' type='text/html' href='http://arundomized.blogspot.com/2007/07/host-activex-controls-in-managed-world.html' title='Host ActiveX controls in Managed World'/><author><name>Arunprakash</name><uri>http://www.blogger.com/profile/04284179691611860787</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1715602486003939396.post-6736407051882179846</id><published>2007-04-28T20:55:00.000-07:00</published><updated>2007-04-28T21:29:33.084-07:00</updated><title type='text'>Custom formatting in DataAdapter.Update</title><content type='html'>Here is the scenario. I have a datatable that has a datetime column and i am using DataAdapter.Update(dataTable) method, to persist the changes back to the database. The default implementation of this method, for some reason, truncates the milliseconds when saving the values to the database. How do I get around this, but still leverage the ease-of-use and performance that the DataAdapter provides? Here is one possible (and simple) solution.&lt;br /&gt;&lt;br /&gt;private void WriteChanges(DataTable dataTable )&lt;br /&gt;{&lt;br /&gt;   aeAdapter.RowUpdating += new SqlCeRowUpdatingEventHandler(adapter_RowUpdating);&lt;br /&gt;   aeAdapter.Update(copyTable);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void adapter_RowUpdating(object sender, SqlCeRowUpdatingEventArgs e)&lt;br /&gt;{&lt;br /&gt;   e.Command.Parameters["@Updated"].Value = FormatDate(e.Row["Updated"]);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private string FormatDate(object datetime)&lt;br /&gt;{&lt;br /&gt;   if (datetime == null Convert.IsDBNull(datetime)) return "";&lt;br /&gt;   DateTime value = Convert.ToDateTime(datetime);&lt;br /&gt;  return value.ToString (System.Globalization.DateTimeFormatInfo.InvariantInfo)      + "." + value.Millisecond.ToString();&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1715602486003939396-6736407051882179846?l=arundomized.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arundomized.blogspot.com/feeds/6736407051882179846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1715602486003939396&amp;postID=6736407051882179846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/6736407051882179846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/6736407051882179846'/><link rel='alternate' type='text/html' href='http://arundomized.blogspot.com/2007/04/custom-formatting-in-dataadapterupdate.html' title='Custom formatting in DataAdapter.Update'/><author><name>Arunprakash</name><uri>http://www.blogger.com/profile/04284179691611860787</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1715602486003939396.post-700174931421514081</id><published>2007-04-01T16:54:00.000-07:00</published><updated>2007-04-01T16:55:42.074-07:00</updated><title type='text'>World's fastest production car</title><content type='html'>&lt;a href="http://www.dailymotion.com/video/x157l2_bugatti-veyron-at-top-speed"&gt;http://www.dailymotion.com/video/x157l2_bugatti-veyron-at-top-speed&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Faster than an F1 car!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1715602486003939396-700174931421514081?l=arundomized.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arundomized.blogspot.com/feeds/700174931421514081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1715602486003939396&amp;postID=700174931421514081' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/700174931421514081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/700174931421514081'/><link rel='alternate' type='text/html' href='http://arundomized.blogspot.com/2007/04/worlds-fastest-production-car.html' title='World&apos;s fastest production car'/><author><name>Arunprakash</name><uri>http://www.blogger.com/profile/04284179691611860787</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1715602486003939396.post-7909010771816054763</id><published>2007-03-10T19:49:00.000-08:00</published><updated>2007-03-10T19:55:38.330-08:00</updated><title type='text'>Hosting .Net Controls on Outlook Form Regions</title><content type='html'>If i am not wrong, VSTO v3 is going to support hosting .Net controls on outlook form regions. But, if you cant wait until then, you can try the ActiveX controls host thats posted on this yahoo group.&lt;br /&gt;&lt;a href="http://tech.groups.yahoo.com/group/vsnetaddin/files/VS.NET%20automation%20Shim%20Control/"&gt;http://tech.groups.yahoo.com/group/vsnetaddin/files/VS.NET%20automation%20Shim%20Control/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I have seen this work. Worth a try.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1715602486003939396-7909010771816054763?l=arundomized.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arundomized.blogspot.com/feeds/7909010771816054763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1715602486003939396&amp;postID=7909010771816054763' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/7909010771816054763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/7909010771816054763'/><link rel='alternate' type='text/html' href='http://arundomized.blogspot.com/2007/03/hosting-net-controls-on-outlook-form.html' title='Hosting .Net Controls on Outlook Form Regions'/><author><name>Arunprakash</name><uri>http://www.blogger.com/profile/04284179691611860787</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1715602486003939396.post-3938188838188769282</id><published>2007-02-21T11:12:00.001-08:00</published><updated>2007-02-21T11:12:14.551-08:00</updated><title type='text'>This is cool</title><content type='html'>&lt;span xmlns=''&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;Posted this using OneNote 2007 and Word 2007&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1715602486003939396-3938188838188769282?l=arundomized.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arundomized.blogspot.com/feeds/3938188838188769282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1715602486003939396&amp;postID=3938188838188769282' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/3938188838188769282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/3938188838188769282'/><link rel='alternate' type='text/html' href='http://arundomized.blogspot.com/2007/02/this-is-cool.html' title='This is cool'/><author><name>Arunprakash</name><uri>http://www.blogger.com/profile/04284179691611860787</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1715602486003939396.post-6197323959684228503</id><published>2007-02-21T00:12:00.000-08:00</published><updated>2007-02-21T00:30:44.311-08:00</updated><title type='text'>Custom formatting in DataGridView</title><content type='html'>I have a dataset that is returned by a web service. It contains a date column, among other columns, and this date is an UTC date(so, GMT time). Now, only when i display it in a datagridview, i need to display the local time depending on the user's local regional settings. Here is what I ended up doing....&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#009900;"&gt;// Bind the Cell formatting event&lt;/span&gt;&lt;br /&gt;dgvGrid.CellFormatting += new &lt;span style="color:#3366ff;"&gt;DataGridViewCellFormattingEventHandler&lt;/span&gt;(dgvGrid_CellFormatting);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;// Formatting event handler&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;void&lt;/span&gt; dgvGrid_CellFormatting(&lt;span style="color:#3366ff;"&gt;object&lt;/span&gt; sender, &lt;span style="color:#3366ff;"&gt;DataGridViewCellFormattingEventArgs&lt;/span&gt; e)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;{&lt;br /&gt;         &lt;span style="color:#3333ff;"&gt;if&lt;/span&gt;( e.Value.GetType() == typeof(DateTime) )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;         {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;                  e.CellStyle.Format = "G";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#009900;"&gt;                 // This is the key. Converts GMT time to local time by adding the offset.&lt;/span&gt;&lt;br /&gt;                  e.Value = ((&lt;span style="color:#3333ff;"&gt;DateTime&lt;/span&gt;)e.Value).ToLocalTime();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;         }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;}&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1715602486003939396-6197323959684228503?l=arundomized.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arundomized.blogspot.com/feeds/6197323959684228503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1715602486003939396&amp;postID=6197323959684228503' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/6197323959684228503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/6197323959684228503'/><link rel='alternate' type='text/html' href='http://arundomized.blogspot.com/2007/02/custom-formatting-in-datagridview.html' title='Custom formatting in DataGridView'/><author><name>Arunprakash</name><uri>http://www.blogger.com/profile/04284179691611860787</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1715602486003939396.post-5942940490475384495</id><published>2007-02-21T00:10:00.000-08:00</published><updated>2007-02-21T00:12:05.441-08:00</updated><title type='text'>Started...</title><content type='html'>I had nothing to do.. I had been wanting to blog for a long time now.. And fate just tied these two together. Here goes my first post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1715602486003939396-5942940490475384495?l=arundomized.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arundomized.blogspot.com/feeds/5942940490475384495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1715602486003939396&amp;postID=5942940490475384495' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/5942940490475384495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1715602486003939396/posts/default/5942940490475384495'/><link rel='alternate' type='text/html' href='http://arundomized.blogspot.com/2007/02/started.html' title='Started...'/><author><name>Arunprakash</name><uri>http://www.blogger.com/profile/04284179691611860787</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
