<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="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" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-10982778</atom:id><lastBuildDate>Fri, 13 Sep 2024 00:46:42 +0000</lastBuildDate><category>Dot Net</category><category>SQL Server</category><category>3DSensing</category><category>Gesture</category><category>TimeOfFlight</category><category>Asp.net</category><category>Game Programming</category><category>Thought</category><category>iphone</category><category>project natal</category><category>xbox360</category><title>Le Thanh Hung&#39;s blog</title><description>A Natural User Interface researcher. &lt;br&gt;&#xa;Current Research : Multitouch, Tangible User Interface, Augmented Reality.</description><link>http://lethanhhung.blogspot.com/</link><managingEditor>noreply@blogger.com (hungle)</managingEditor><generator>Blogger</generator><openSearch:totalResults>60</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-7189034935989375346</guid><pubDate>Tue, 13 Apr 2010 10:02:00 +0000</pubDate><atom:updated>2010-04-13T17:08:59.468+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">iphone</category><category domain="http://www.blogger.com/atom/ns#">Thought</category><title>Theory and Thought  : New iPhone Developer Agreement  4.0 beta bans many  third-party compiler</title><description>Apple, they&#39;ve just wanted to ban flash developers from their platform, but as collateral damage, even unity, monotouch, titanium etc is banned.  Why ? I search all WWW, read many comments, articles,  but this is best reason, best Theory  from &lt;a href=&quot;http://www.bangbangclick.com/&quot; rel=&quot;external nofollow&quot; class=&quot;url&quot;&gt;Sean Baggaley&lt;/a&gt; (http://blogs.unity3d.com/2010/04/10/unity-and-the-iphone-os-4-0/#comment-12751):&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Apple’s only reason for the new T’s &amp;amp; C’s is to ensure a  consistent user experience. The user experience is ALL Apple cares  about. The developer is secondary. Their design philosophy is entirely  focused around the *user*, not the developer. This means controlling as  much of the design and production process as possible—the App Store,  iTunes, synchronisation, the APIs, the GUI, marketing, packaging design,  etc. What many see as control freakery, is actually just an inherent  aspect of their approach to design. &lt;/p&gt; &lt;p&gt;When Macs were still based around the PowerPC architecture, Apple  were very badly let down by decisions by IBM and Motorola / Freescale  (who made the PowerPC chips) which resulted in stagnation of these CPUs.  Hence their switch to Intel processors. This experience left its mark  on Apple, hence a big part of their philosophy is picking future  technologies which they can exert some control over. HTML5 is an open  standard which Apple can implement themselves. Flash is not, and would  leave Apple dependent on a third party developer which has already  proven to be a fair-weather friend at best. (Adobe’s treatment of the  Mac version of Premiere is a good example.)&lt;/p&gt; &lt;p&gt;This has nothing to do with Flash’s notoriously poor performance on  OS X (and Linux) platforms: Adobe certainly have the resources to fix  that if they want to.&lt;/p&gt; &lt;p&gt;Remember, too, that OS X’s entire display technology is built around  PDF, and has been since OS X’s first release. So this isn’t an  “anti-Adobe” thing. This is a fundamental *philosophical* issue. Flash  isn’t owned by Apple. Apple therefore cannot help shape its future, but  Apple *do* have some say in the future of HTML5 as one of the two people  in charge of its development is an Apple employee. (The other is paid  by Google.)&lt;/p&gt; &lt;p&gt;Unlike Unity, Adobe’s pre-compiled Flash tool for producing iPhone  apps does not appear to use Apple’s tools at all. This means such apps  would not be able to take advantages of SDK updates—something which can  easily break legacy apps if not used properly. &lt;/p&gt; &lt;p&gt;Unlike Microsoft, Apple aren’t all that bothered about retaining  backwards compatibility over the full life-span of OS X. If a new API  lets them improve the end user’s experience, Apple would rather you  updated your app(s) to use it, rather than retaining their old  interfaces. Apple are utterly ruthless about improving their APIs, and  will cheerfully kill off older ones if their new one does things better.  &lt;/p&gt; &lt;p&gt;Unity is not (yet) a threat to Apple’s philosophy directly, but Flash  is. It’s possible Apple might not be that bothered about losing Unity  support for their fully closed platforms—it’s unlikely, but a lot  depends on Apple’s future plans—but I suspect they won’t go this far.  Unity competes with Director, not Flash, and has uses far beyond games. &lt;/p&gt; &lt;p&gt;I think the key differentiator is that Unity does use Apple’s XCode  toolchain as part of its build process. Adobe’s solution does not. It’s  therefore much more likely that the latter will more easily fall foul of  major changes to the underlying OS—for which Apple, not Adobe, would be  blamed by users.&lt;/p&gt; &lt;p&gt;If Adobe’s solution were allowed in, developers might easily find  iPhone OS 4 breaks their apps. Who would customers blame? Apple, not  Adobe. This is a problem Microsoft have suffered from for years and  Apple aren’t about to repeat history.&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2010/04/theory-and-thought-new-iphone-developer.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-3894959707614103237</guid><pubDate>Sat, 06 Jun 2009 13:58:00 +0000</pubDate><atom:updated>2009-06-06T21:01:28.088+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">3DSensing</category><category domain="http://www.blogger.com/atom/ns#">Gesture</category><category domain="http://www.blogger.com/atom/ns#">TimeOfFlight</category><title>Time Of Flight and 3D camera</title><description>Gesturetek là nhà sản xuất ra thuật toán 3D sensing dựa trên nguyên lý Time Of Flight, có thể hiểu là họ có quyền sở hưu trí tuệ về mặt software. Gesturetek liên kết với Canesta  (http://www.canesta.com) để sản xuất  ra chip 3D sensing, chip sẽ được nhúng vào thuật tóan để tính toán việc capture và dựng lại mô hình 3D, chip này Canesta định bán đại trà cho các nhà sản xuất thiết bị OEM để tích hợp vô sản phẩm của họ. Có thể Microsoft đã mua chip này và gắn cho Camera Project Natal của họ.   Hiện  Canesta&lt;br /&gt;cũng đã bán chip cho Hitachi để tích hợp vô Tivi của họ, người dùng có thể gesture để control TV menu http://news.cnet.com/8301-17938_105-10253925-1.html.&lt;br /&gt;&lt;br /&gt;Về thuật toán Time Of Flight :&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDN5Z8mAb6TOC00SCCCAIsu5dDGbNEHSR6_nf6cWXtacY6h92DJZ30dc9hRWRH0VobbWW00M3_DjA7n0931O34orzP2sG_wIUHNoZ2OlCvVgH-R0hqFW2MnLR0GtN33TSYPciF/s1600-h/howitworks.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 400px; height: 226px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDN5Z8mAb6TOC00SCCCAIsu5dDGbNEHSR6_nf6cWXtacY6h92DJZ30dc9hRWRH0VobbWW00M3_DjA7n0931O34orzP2sG_wIUHNoZ2OlCvVgH-R0hqFW2MnLR0GtN33TSYPciF/s400/howitworks.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5344214045536416258&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; Hầu hết chúng ta ai cũng biết ánh sáng phải mất thời gian để đi từ điểm này đến điểm khác.  Ví dụ hạt photon của ánh sáng đi từ ngôi sao này đến ngôi sao khác có thể tốn thời gian hàng trăm triệu năm , mà ta gọi là triệu năm ánh sáng. Do ánh sáng có tốc độ, nếu ta biết thời gian ta có thể tính khoảng cách.  Ánh sáng trỏ tới mỗi pixel trên sensor của camera được phản chiếu từ nhiều nguồn trong cảnh quan trước ống kính. Canesta chip đo được khoảng thời gian  ánh sáng trải qua đề đi từ khung cảnh đến pixel trên sensor, do đó nó 1 tính được khoảng cách của điểm sáng đó tới pixel trên sensor.  Sau khi đo khoảng cách từ hàng triệu điểm trên vật thể, Canesta sẽ dụng lại mô hình 3D wireframe của vật thể đó. Các bạn có hình dung ra được chưa, ví dụ cái mũi của chúng ta,  khoảng cách từ đỉnh mũi và chân lổ mũi tới camera sẽ khác nhau, Camesta sẽ thu thập được hàng triệu điểm ảnh từ cái mũi của chúng ta và do biết được khoảng cách nó biết được chiều sâu dựng lại được mô hình 3D của cái mũi.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-cLy8V_dFLLxuLsKRz317TjorblbkR2qQpI07ivbtnjMEqp0Pm1hC8xlK1dmlAatzblfrCCjlmEEmt49VAUFIP7uUV2rKO7S41UbQLuj708SYthxB6s49M51nNe9_dsh2EqFP/s1600-h/zcamtech.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 225px; height: 147px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-cLy8V_dFLLxuLsKRz317TjorblbkR2qQpI07ivbtnjMEqp0Pm1hC8xlK1dmlAatzblfrCCjlmEEmt49VAUFIP7uUV2rKO7S41UbQLuj708SYthxB6s49M51nNe9_dsh2EqFP/s400/zcamtech.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5344214050397786514&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Về cơ bản , chip của Canesta dùng nguyên lý hơi giống nguyên lý của radar. Ở Radar, sóng radio được phát ra, từ angten cho tới đối tượng , sau đó sống radio được phản ngược lại, lúc đó radar đo được khoảng cách của đối tượng.  Nhưng ở Canesta , sóng radio được thanh bằng ánh sáng hồng ngoại. Vì sao dùng hồng ngoại, vì hồng ngoại mắt người không nhìn thấy được, và nó không bị phụ thuộc vào ánh sáng môi trường đang là tối (ban đêm, trong phòng tắt đèn) hay đang sáng. Trên chip sẽ có các timers , nó bắn liên tục các photon hồng ngoại tới vật thể , và no sẽ thu được một mãng khoảng cách trả về ,  và nó dùng mãng khoảng cách này để dụng lại mô hình 3D của vật thể. Một tính tóan này đều nào trên 1 con chip , do đó không làm ảnh hướng đến CPU của thiết bị xài tới nó.&lt;br /&gt; Việc ứng dụng chip này là vô tận, có thể kể : hệ thp61ng cảnh báo an tòan cho xe ôtô có thể detect những object nguy hiểm ngoài tầm nhìn của tài xế, điện thoại 3D hologram như trong phim star war, điều khiển giao diện hương trình bằng cách Gesture như phim Minority Report, dùng hỗ trợ cho vũ khi trong chiến tranh. Ôi vô vàn không kể hết, kỹ nguyên mới sắp bắt đầu, y chang như trong cácc phim khoa học giả tưởng.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2009/06/time-of-flight-and-3d-camera.html</link><author>noreply@blogger.com (hungle)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDN5Z8mAb6TOC00SCCCAIsu5dDGbNEHSR6_nf6cWXtacY6h92DJZ30dc9hRWRH0VobbWW00M3_DjA7n0931O34orzP2sG_wIUHNoZ2OlCvVgH-R0hqFW2MnLR0GtN33TSYPciF/s72-c/howitworks.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-4884375458419291105</guid><pubDate>Sat, 06 Jun 2009 13:42:00 +0000</pubDate><atom:updated>2009-06-06T21:21:34.553+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">3DSensing</category><category domain="http://www.blogger.com/atom/ns#">Gesture</category><category domain="http://www.blogger.com/atom/ns#">project natal</category><category domain="http://www.blogger.com/atom/ns#">TimeOfFlight</category><category domain="http://www.blogger.com/atom/ns#">xbox360</category><title>Project Natal : phân tích chi tiết về mặt công nghệ, dự đoán giá và đối thủ</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUlZ_k_WntPrRQLD6_P0M3KwqNS1Tf8Gdp6GzBgO5E778UbCfirOo58maj8qMQ4WWgLw0otEwkDGV_oTmKhGn4dyjTBotF3Dx0bDfBqxwBoCVU8vGiMz8jiSFzjW3Pwj9H-E01/s1600-h/xbox-natal-pr-1.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 385px; height: 400px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUlZ_k_WntPrRQLD6_P0M3KwqNS1Tf8Gdp6GzBgO5E778UbCfirOo58maj8qMQ4WWgLw0otEwkDGV_oTmKhGn4dyjTBotF3Dx0bDfBqxwBoCVU8vGiMz8jiSFzjW3Pwj9H-E01/s400/xbox-natal-pr-1.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5344210439815218818&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQX6kR_YXu8r5tUHj9KYzx4FuJakzmJqLPWy2Nr2fzemN3WoYuvEPdqguUNDW1eqCkEPeYXVtGQvUkBIhwyvbYttlhElyz4scgfYL370sSmH-Z6wd-2VKRQ_Yn6WG-ppM980zo/s1600-h/pic4.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 382px; height: 400px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQX6kR_YXu8r5tUHj9KYzx4FuJakzmJqLPWy2Nr2fzemN3WoYuvEPdqguUNDW1eqCkEPeYXVtGQvUkBIhwyvbYttlhElyz4scgfYL370sSmH-Z6wd-2VKRQ_Yn6WG-ppM980zo/s400/pic4.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5344210451971813730&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyOo45yIp1qYX33K_vwLEDjd1PV-FyThuWty6GXsrLBmp-zpiM4V_4PbD0b29gxPV3-y5PlxyRO76-KJpsfoeo16LjXoYnK2-noPXaT1lfe0Q3lfZOWcW5wuV63YhmIzSi_JYS/s1600-h/pic3.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 382px; height: 400px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyOo45yIp1qYX33K_vwLEDjd1PV-FyThuWty6GXsrLBmp-zpiM4V_4PbD0b29gxPV3-y5PlxyRO76-KJpsfoeo16LjXoYnK2-noPXaT1lfe0Q3lfZOWcW5wuV63YhmIzSi_JYS/s400/pic3.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5344210449652448674&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi4zk9ZXT2VDcpgYhPJnspc3hFaKo3EKCLJeoq_rbJXrsjE_4Kn4y_6EMY280eEP_n-dYgkMlNpTuT7pVSRqnHJvNt_wjZjhiwZOWHRJ9GEQYOU0bd2SOZhZ6c0V9qUbscdc1x/s1600-h/pic2.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 382px; height: 400px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi4zk9ZXT2VDcpgYhPJnspc3hFaKo3EKCLJeoq_rbJXrsjE_4Kn4y_6EMY280eEP_n-dYgkMlNpTuT7pVSRqnHJvNt_wjZjhiwZOWHRJ9GEQYOU0bd2SOZhZ6c0V9qUbscdc1x/s400/pic2.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5344210449893973762&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi53MExY64iocmmsNtWJPsg41YewqPmzncJ6se1vOxNaaC41yWtRAZWR2dEiGKlsW9pzWiSzvGgOb7URqfj2vt29qyPOGj0V7CCXx-fggbweplh62KkqwsT7GZMZflRn59JxDYd/s1600-h/pic1.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 382px; height: 400px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi53MExY64iocmmsNtWJPsg41YewqPmzncJ6se1vOxNaaC41yWtRAZWR2dEiGKlsW9pzWiSzvGgOb7URqfj2vt29qyPOGj0V7CCXx-fggbweplh62KkqwsT7GZMZflRn59JxDYd/s400/pic1.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5344210442020717602&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;style type=&quot;text/css&quot;&gt;  &lt;!--   @page { size: 8.5in 11in; margin: 0.79in }   P { margin-bottom: 0.08in }  --&gt; &lt;/style&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;  &lt;/p&gt;  &lt;p style=&quot;margin-bottom: 0in;&quot;&gt; &lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;Trước khi đi chi tiết vào kỷ thuật đằng sau Project Natal thì xin dẫn nhập một chút . Chẳng là dạo gần đây đang tham gia một dự án research Multi Touch table tương như Microsoft Surface (&lt;a href=&quot;http://www.microsoft.com/surface/&quot;&gt;http://www.microsoft.com/surface/&lt;/a&gt;) nên mình hiểu rất rõ về cơ chế motion detect của camera và hồng ngoại.  Khi xem Microsoft show hàng Project Natal thì lúc đầu mình thấy nó rất giống PlayStaion 2 eyetoy đã từng chơi rất lâu từ thời PS2 . Cũng dùng cơ thể để tương tác với các object trong game mà không cần controller . &lt;/span&gt; &lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;  Đây là EyeToy Play trailer :&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;&lt;object width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/6D_EniA3YZc&amp;amp;hl=en&amp;amp;fs=1&amp;amp;&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/6D_EniA3YZc&amp;amp;hl=en&amp;amp;fs=1&amp;amp;&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/span&gt; &lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;Link : &lt;a href=&quot;http://www.youtube.com/watch?v=6D_EniA3YZc&quot;&gt;http://www.youtube.com/watch?v=6D_EniA3YZc&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Đây là game EyeToy Play: Hero :&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=7OXF_uVy6tI&amp;amp;feature=related&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;&lt;object width=&quot;560&quot; height=&quot;340&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/7OXF_uVy6tI&amp;amp;hl=en&amp;amp;fs=1&amp;amp;&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/7OXF_uVy6tI&amp;amp;hl=en&amp;amp;fs=1&amp;amp;&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;560&quot; height=&quot;340&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;http://www.youtube.com/watch?v=7OXF_uVy6tI&amp;amp;feature=related&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Đây là game Eyetoy Boxing :&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=dj3UrfjbGIs&amp;amp;feature=related&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;&lt;object width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/dj3UrfjbGIs&amp;amp;hl=en&amp;amp;fs=1&amp;amp;&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/dj3UrfjbGIs&amp;amp;hl=en&amp;amp;fs=1&amp;amp;&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=dj3UrfjbGIs&amp;amp;feature=related&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;http://www.youtube.com/watch?v=dj3UrfjbGIs&amp;amp;feature=related&lt;/span&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Còn đây là game Eyetoy Virtual Fighter :&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;&lt;object width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/w3UOufHgwh0&amp;amp;hl=en&amp;amp;fs=1&amp;amp;&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/w3UOufHgwh0&amp;amp;hl=en&amp;amp;fs=1&amp;amp;&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=w3UOufHgwh0&amp;amp;feature=related&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;http://www.youtube.com/watch?v=w3UOufHgwh0&amp;amp;feature=related&lt;/span&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Nhưng sau khi xem kỹ lại kỹ thuật capture thì 2 công nghê này khác nhau.  \&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Công nghệ của Sony Playstion eyetoy trên PS2 là công nghệ motion detect 2D bình thường, hầu hết các camera về an ninh đều có khả năng này và một số software cho webcam trên pc cũng có khả năng này. Eyetoy nó detect được vật thể chuyện động , sau đó extract đối tượng ra khỏi background , rồi sau đó detect va chạm giữa đội tượng thật và đồi tượng 3D, nhưng chỉ giới hạn detect ở mức độ 2D.   &lt;/span&gt; &lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Công nghệ ở project Natal, ta thấy rõ là mức độ kinh hoàng hơn , mọi chuyển động của người thật đều được true mapping 1:1 chính xác gần như hòan hảo. Người thật giơ tay trái → nhân vật 3D giơ tay trái, người thật đá chân phải → nhân vật 3D đá chân phải, người thật  khum người xuống , → nhân vật 3D khum người xuống. Rõ ràng là hơn Ps2 eyetoy.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Nhưng cái shock nhất ở đây là 2 công nghệ này bắt ngưồn từ 1. Có thể nói nó cùng cha đẻ, có thể coi PS2 Eyetoy là version 1 chỉ detect được 2D , còn Project Natal là version 2 detect được 3D.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Bây giờ mình sẽ đi vô chi tiết nguồn gốc bí ẩn đằng sau Project Natal.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Chuyện kể rằng ngày xửa ngày xưa xa lắm rồi ở đất nước Israel  có 1 công ty nhỏ đựoc thành lập lấy tên là 3DV Systems, họ gồm những thành viên đam mê lĩnh vưc computer vision nghiên cứu vể khả năng tương tách giữa máy tính và con người. Họ đã nghiên cưu ra công nghệ gọi là &lt;/span&gt;&lt;em&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;Time &lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;Of &lt;/span&gt;&lt;em&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;Flight&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; , tính khỏan cách từ vật thể đến camera dựa trên thời gian  bay của ánh sáng hồng ngoại từ camera tới vật thể và đi ngược trở lại camera. Kỹ thuật &lt;/span&gt;&lt;em&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;Time &lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;Of &lt;/span&gt;&lt;em&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;Flight&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;  này sẽ được bàn kỹ hơn .Năm 2000 họ đã release một camera có khả năng capture 3D đặt tên nó là Zcam. Zcam có chip 3D sensor để capture được chiều sâu của đối tượng (cột tọa độ Z trong đồ họa 3D) và dựng lại đối tượng 3D dạng thô rồi chuyền tới ứng dụng để sử lý tiếp, Zcam còn có khả năng detect đựoc hand and body gesture để truyền lệch đến ứng dụng xử lý.  &lt;/span&gt; &lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;   &lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;3DV dự định sẽ tung ra sản phẩm camera 3D Zcam vào cuối năm 2008 , dự định sẽ bán với giá 69.9$ thấp hơn Ps2 Eyetoy (lúc mới ra buulde eyetoy + game là $100). Nhưng cuối cùng sản phẩm đã không có mặt trên thị trường. Vì sao ? Tại vì Micrsoft đã mua lại quyền sử dụng công nghệ 3D capture này. Đây cũng là nguồn gốc tạo ra Project natal mà các bạn đã thấy.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Trước khi tiếp tục bài viết rất dài này , các bạn hãy xem qua một số tech show của 3DV, các bạn sẽ mườn tượng được mối liên hệ của nó tới Project Natal :&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Capturing Depth - A human face  :  &lt;a href=&quot;http://www.3dvsystems.com/gallery/movies/Face.mpg&quot;&gt;http://www.3dvsystems.com/gallery/movies/Face.mpg&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Video conferencing with the background of your choice :&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; &lt;a href=&quot;http://www.3dvsystems.com/gallery/movies/Background%20Replacement.mpg&quot;&gt;http://www.3dvsystems.com/gallery/movies/Background%20Replacement.mpg&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Tracking full body :&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; &lt;a href=&quot;http://www.3dvsystems.com/gallery/movies/Skeleton.mpg&quot;&gt;http://www.3dvsystems.com/gallery/movies/Skeleton.mpg&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Immersion in virtual reality :&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; &lt;a href=&quot;http://www.3dvsystems.com/gallery/movies/VirtualGame.mpg&quot;&gt;http://www.3dvsystems.com/gallery/movies/VirtualGame.mpg&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Let your fingers do the trick (gesture để điều khiển menu và chương trình):&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; &lt;a href=&quot;http://www.3dvsystems.com/gallery/movies/Vista%20Flip%203D.mpg&quot;&gt;http://www.3dvsystems.com/gallery/movies/Vista%20Flip%203D.mpg&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; http://www.3dvsystems.com/gallery/movies/Windows%20Media%20Center.mpg&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;   &lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Throw a ball at your TV :&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; &lt;a href=&quot;http://www.3dvsystems.com/gallery/movies/VirtualSquash.mpg&quot;&gt;http://www.3dvsystems.com/gallery/movies/VirtualSquash.mpg&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; A new gaming experience:&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; http://www.3dvsystems.com/gallery/movies/Flight%20Simulator.mpg &lt;/span&gt; &lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; &lt;a href=&quot;http://www.3dvsystems.com/gallery/movies/Boxing%20-%20Heavy%20Bag.mpg&quot;&gt;http://www.3dvsystems.com/gallery/movies/Boxing%20-%20Heavy%20Bag.mpg&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; &lt;a href=&quot;http://www.3dvsystems.com/gallery/movies/Boxing%20-%20The%20ring.mpg&quot;&gt;http://www.3dvsystems.com/gallery/movies/Boxing%20-%20The%20ring.mpg&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; &lt;a href=&quot;http://www.3dvsystems.com/gallery/movies/Boxing%20Mix%20No%20MX.mov&quot;&gt;http://www.3dvsystems.com/gallery/movies/Boxing%20Mix%20No%20MX.mov&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Mình tiếp tục bài viết, bên cạnh 3DV system , còn có một công ty khác cũng sở hữu công nghệ Time of Flight này là Gesturetek.  Công ty này sở hữa thương hiệu 3D Depth Sensing ứng dụng kỹ thuật Time of Flight and và Gesture  series, hiện cả  2 đại gia Sony và Microsoft đều mua công ngjệ của  Gesturetek cho Ps2 Eyetoy và Xbox 360 Camera Vision. Trong trang web này , các bạn có thể thấy demo (flash) y chang như những gì Microsoft Project Natal đã trình diễn &lt;a href=&quot;http://www.gesturetek.com/3ddepth/introduction.php&quot;&gt;http://www.gesturetek.com/3ddepth/introduction.php&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;  &lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;Scroll chuột xuống cuối trang web bạn sẽ thấy logo Eyetoy và Xbox360 &lt;a href=&quot;http://www.gesturetek.com/3ddepth/introduction.php&quot;&gt;http://www.gesturetek.com/3ddepth/introduction.php&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;  Vấn  để chúng ta cần phân tích thêm là ở chỗ , Sony đã mua bản quyền hồi năm 2005 &lt;a href=&quot;http://www.gesturetek.com/press/press_feb17_05.php&quot;&gt;http://www.gesturetek.com/press/press_feb17_05.php&lt;/a&gt; , và sau đó 1 năm sau năm 2006 Microsoft mới mua bản quyền &lt;a href=&quot;http://www.gesturetek.com/press/press_may10_06.php&quot;&gt;http://www.gesturetek.com/press/press_may10_06.php&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;  &lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Và theo mình biết thì chưa thấy sản phẩm game motion gesture nào trên xbox360 ra đời (ai biết thì bổ sung dùm mình). Và cho mãi tới hôm nay , năm 2009 , Microsoft mới sghow hàng, và quay lại trang này &lt;a href=&quot;http://www.gesturetek.com/3ddepth/introduction.php&quot;&gt;http://www.gesturetek.com/3ddepth/introduction.php&lt;/a&gt; ta lại thấy công nghệ của Gesturetek đã tiến bộ hơn xưa, đã đạt đến khả năng capture 3D motion. Vậy câu hỏi đặt ra là tại sao Sony lại không show hàng tương tự như Microsoft , vì cả 2 đều cùng một nguồn như nhau mà. Có 3 giả thuyết :&lt;/span&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;Giả  thuyết 1 :  Microsoft lại chơi trò độc quyền, tung  tiền mua đứt công nghệ 3D Sensing này cho tới  năm 2015, và Gesturetek không được bán 3D  sensing tới cty khác, chỉ được bán kỹ thuật  Gesture Recognite .&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;Giả  thuyết 2 : Sony muốn làm tiền, chế thêm cái  sensor cầm trên tay để bán kiếm thêm tiền,  vì Eyetoy mà ap dụng 3D sensing vô thì  y chang Project Natal.&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;Giả  thuyết 3 : 3D sensing của Gesturetek ra sau khi có PS3  Eye trên thị trường, do Sony đã lỡ sản xuất  ra PS3 Eye tràn lan trên thị trường rồi , bây  giờ để gắn chip 3D sensing vô thì phải ra  model PS3 Eye version 2 , gamer người đã mua Ps3 Eye  version đầu sẽ phản đối, buộc sony phải tao thêm  phụ kiện đi kèm với Ps3 Eye cũ mà ta đã  thấy ở E3 2009.&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Một điều thú vị nũa là Jonny Lee, anh chàng nổi tiếng trên youtube hacking wiimote để biến bàn tay của mình thành điều khiển gesture ứng dụng từ xa như Minority Report movies cũng được mời về tham gia dự án này Project natal của Microsoft.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt; Sự việc càng ngày càn hấp d7ã, nên mình mở topic này ra để mọi người đưa ra cácc giả thuyết . &lt;/span&gt; &lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt; &lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;Về phần mình thì mình đưa ra giả thuyết thế này :&lt;/span&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;Microsoft  muống độc quyền cong nghệ Time Of Flight nên đã  mua cả 3DV và Gestureek.&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;Giá  của Natal 3D camera sẽ khoản 69.99$ bằng với giá  Zcam mà 3DV định reselase cuối năm 2008 .&lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;/li&gt;&lt;/ul&gt;   &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;   &lt;span style=&quot;font-family:Tahoma,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2009/06/project-natal-phan-tich-chi-tiet-ve-mat.html</link><author>noreply@blogger.com (hungle)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUlZ_k_WntPrRQLD6_P0M3KwqNS1Tf8Gdp6GzBgO5E778UbCfirOo58maj8qMQ4WWgLw0otEwkDGV_oTmKhGn4dyjTBotF3Dx0bDfBqxwBoCVU8vGiMz8jiSFzjW3Pwj9H-E01/s72-c/xbox-natal-pr-1.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-116658716624116331</guid><pubDate>Wed, 20 Dec 2006 03:45:00 +0000</pubDate><atom:updated>2009-06-05T17:40:11.885+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Dot Net</category><category domain="http://www.blogger.com/atom/ns#">Game Programming</category><title>XNA Game Studio Express 1.0  released</title><description>This is so cool ! In the past, I used PlayStation 2 Linux Development Kit to write applications / demo for my PS2. But this ps2 kit is very hard to learn, very small library was supplied, and I must use C++ to code, this is a nightmare. And now, Microsoft has released XDA Game Studio, I&#39;m so excited. I can use C# to develop game now, not only for PC but also next-gen console XBox 360 . Oh, hoo hoo \^_^/ .&lt;br /&gt;&lt;br /&gt;Some link:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://msdn.microsoft.com/directx/xna/gse/&quot;&gt;Download XDA &lt;/a&gt;&lt;a href=&quot;http://msdn.microsoft.com/directx/xna/gse/&quot;&gt;here&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://msdn.microsoft.com/directx/XNA/default.aspx&quot;&gt; Official XDA&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.xnadevelopment.com/&quot;&gt;Community Site.&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/12/xna-game-studio-express-10-released.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-115693577908249491</guid><pubDate>Wed, 30 Aug 2006 10:53:00 +0000</pubDate><atom:updated>2009-06-05T16:44:49.801+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Dot Net</category><title>C# 2.0 : Nullable Types</title><description>&lt;h3 id=&quot;problem&quot;&gt;&lt;span style=&quot;font-size:180%;&quot;&gt;Problem&lt;/span&gt;&lt;/h3&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; User Class&lt;/span&gt;&lt;br /&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; User&lt;br /&gt;{&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; userID;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; DateTime registeredDate;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; User() {}&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; UserID&lt;br /&gt;  {&lt;br /&gt;      &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; userID; }&lt;br /&gt;      &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; { userID &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; value; }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; DateTime RegisteredDate&lt;br /&gt;  {&lt;br /&gt;      &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; registeredDate; }&lt;br /&gt;      &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; { registeredDate &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; value; }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; Create User from a DataReader&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;virtual&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; User CreateUserFromReader(IDataReader reader)&lt;br /&gt;{&lt;br /&gt;  User item &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; User();&lt;br /&gt;&lt;br /&gt;  item.UserID &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;)reader[&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;UserID&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;];&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;    //&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; throw exception &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;if reader[&quot;RegisteredDate&quot;] equals null &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;    item.RegisteredDate &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; (DateTime)reader[&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;RegisteredDate&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;]; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; item;&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;Because C# 1.1 does not support null value for DateTime so the example above will throw exception if reader[&quot;RegisteredDate&quot;] equals null.&lt;br /&gt;&lt;span style=&quot;font-size:180%;&quot;&gt;Solution&lt;/span&gt;&lt;span style=&quot;font-size:180%;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;br /&gt;Old schoold soltution :&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; Create User from a DataReader&lt;/span&gt;&lt;br /&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;virtual&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; User CreateUserFromReader(IDataReader reader)&lt;br /&gt;{&lt;br /&gt;  User item &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; User();&lt;br /&gt;&lt;br /&gt;  item.UserID &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;)reader[&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;UserID&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;];&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;reader.IsDBNull(reader.GetOrdinal(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;RegisteredDate&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;)))  &lt;br /&gt;  {&lt;br /&gt;      item.RegisteredDate &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; (DateTime)reader[&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;RegisteredDate&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;];&lt;br /&gt;  }&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;  {      &lt;br /&gt;      item.RegisteredDate &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; DateTime(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;1900&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; item;&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;Now in C#2.0 we can resolve null problem by declaration RegisteredDate as nullable DateTime with &lt;b&gt;?&lt;/b&gt; symbol :&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; User Class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; User&lt;br /&gt;{&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; userID;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; DateTime&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; registeredDate;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; User() {}&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; UserID&lt;br /&gt;  {&lt;br /&gt;      &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; userID; }&lt;br /&gt;      &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; { userID &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; value; }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; DateTime&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; RegisteredDate&lt;br /&gt;  {&lt;br /&gt;      &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; registeredDate; }&lt;br /&gt;      &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; { registeredDate &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; value; }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; Create User from a DataReader&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;virtual&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; User CreateUserFromReader(IDataReader reader)&lt;br /&gt;{&lt;br /&gt;  User item &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; User();&lt;br /&gt;&lt;br /&gt;  item.UserID &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;)reader[&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;UserID&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;];&lt;br /&gt;  item.RegisteredDate &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;   (reader.IsDBNull(reader.GetOrdinal(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;RegisteredDate&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;))) &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;      &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; : (DateTime)reader[&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;RegisteredDate&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;];&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; item;&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;font-size:180%;&quot;&gt;Nullable type&lt;br /&gt;&lt;/span&gt;Nullable types are constructed using ? type modifier.&lt;br /&gt;Example :&lt;br /&gt;               int? age;&lt;br /&gt;               string? name;&lt;br /&gt;               DateTime? birthday;&lt;br /&gt;&lt;br /&gt;A nullable type has two public read-only properties: HasValue and Value. When HasValue is true, the Value property returns the contained value. When HasValue is false, an attempt to access the Value property throws an exception.&lt;br /&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;DateTime&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; registeredDay;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; throw exception if RegisteredDate is null&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;registeredDay &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; user.RegisteredDate; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; (user.HasValue)&lt;br /&gt;{&lt;br /&gt;  registeredDay &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; user.RegisteredDate&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;{      &lt;br /&gt;  registeredDay &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;font-size:180%;&quot;&gt;Null colalescence&lt;/span&gt;&lt;br /&gt;C# 2.0 introduces a new operator called the &lt;b&gt;null coalescing operator&lt;/b&gt; denoted by&lt;br /&gt;double question marks &lt;b&gt;?? . &lt;/b&gt;If the instance is null, the value on the right is returned&lt;br /&gt;otherwise the nullable instance value is returned.&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; x &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; y &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; z &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; y &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;??&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; x;&lt;br /&gt;&lt;br /&gt;response.write(z); &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; z = 10&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;y &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;99&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; k &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; y &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;??&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; x;&lt;br /&gt;response.write(k); &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; k = 99&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/08/c-20-nullable-types.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-115693500054110297</guid><pubDate>Wed, 30 Aug 2006 10:44:00 +0000</pubDate><atom:updated>2009-06-05T16:44:49.801+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Dot Net</category><title>C# 2.0 : Partial types</title><description>&lt;span style=&quot;font-size:180%;&quot;&gt;What is Partial types ?&lt;/span&gt;&lt;br /&gt;&lt;b&gt;Partial types&lt;/b&gt; is types that allow &lt;b&gt;classes&lt;/b&gt;, &lt;b&gt;structs&lt;/b&gt;, and &lt;b&gt;interfaces&lt;/b&gt; to be &lt;b&gt;broken into multiple&lt;/b&gt; pieces stored in &lt;b&gt;different &lt;/b&gt;&lt;b&gt;source files&lt;/b&gt; for easier development and maintenance. Additionally, partial types allow separation of machine-generated and user-written parts of types so that it is easier to augment code generated by a tool.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:180%;&quot;&gt;Problems&lt;br /&gt;&lt;/span&gt;While it is good programming practice to maintain all source code for a type in a single file, sometimes a type becomes large enough that this is an impractical constraint. Furthermore, programmers often use source code generators (such as CodeSmith) to produce the initial structure of an application, and then modify the resulting code. Unfortunately, when source code is emitted again sometime in the future, existing modifications are overwritten.&lt;br /&gt;&lt;h3 style=&quot;font-weight: normal;&quot; id=&quot;solution&quot;&gt;&lt;span style=&quot;font-size:180%;&quot;&gt;Solution&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;A new type modifier, &lt;b&gt;partial&lt;/b&gt;, is used when defining a type in multiple parts. The following is an example of a partial class that is implemented in two parts.&lt;/span&gt;&lt;br /&gt;&lt;/h3&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Part one :&lt;/span&gt;&lt;br /&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; partial &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer&lt;br /&gt;{&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; id;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; name;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; address;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Order&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; orders;&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer()&lt;br /&gt;  {&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-size:100%;&quot; &gt;Part two :&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; partial &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer&lt;br /&gt;{&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; SubmitOrder(Order order)&lt;br /&gt;  {&lt;br /&gt;      orders.Add(order);&lt;br /&gt;  }&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;bool&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; HasOutstandingOrders()&lt;br /&gt;  {&lt;br /&gt;      &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; orders.Count &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;;&lt;br /&gt;  }&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;When the two parts above are compiled together, the resulting code is the same as if the class had been written as a single unit:&lt;br /&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer&lt;br /&gt;{&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; id;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; name;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; address;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Order&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; orders;&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer()&lt;br /&gt;  {  &lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; SubmitOrder(Order order)&lt;br /&gt;  {&lt;br /&gt;      orders.Add(order);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;bool&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; HasOutstandingOrders()&lt;br /&gt;  {&lt;br /&gt;      &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; orders.Count &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;;&lt;br /&gt;  }&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/08/c-20-partial-types.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-115693464120229872</guid><pubDate>Wed, 30 Aug 2006 10:41:00 +0000</pubDate><atom:updated>2009-06-05T16:44:49.801+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Dot Net</category><title>C# 2.0 : Anonymous Methods</title><description>&lt;span style=&quot;font-size:180%;&quot;&gt;What is Anonymous Method ?&lt;br /&gt;&lt;/span&gt;C# 2.0 introduce new method named Anonymous Methods. Anonymous Methods are Inline Delegate.&lt;br /&gt;&lt;br /&gt;Old school Delegate :&lt;br /&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;.btnLogin.Click &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; System.EventHandler(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;.btnLogin_Click);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; btnLogin_Click(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; sender, System.EventArgs e)&lt;br /&gt;{&lt;br /&gt;   Response.Write(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;tui ne&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Anonymous Method :&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;.btnLogin.Click &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;delegate&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; { Response.Write(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;tui ne&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;); }&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/08/c-20-anonymous-methods.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-115691273435030174</guid><pubDate>Wed, 30 Aug 2006 04:33:00 +0000</pubDate><atom:updated>2009-06-05T16:44:49.801+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Dot Net</category><title>C# 2.0 : Generic methods</title><description>This is a typical non-generic method :&lt;br /&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; AddMultiple(List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Customer&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; customers, &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;params&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer[] values)&lt;br /&gt;{&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; (Customer value &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; values)&lt;br /&gt;    {&lt;br /&gt;        customers.Add(value);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;In order to add mutiple customer into List :&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Customer&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; customers &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Customer&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;();&lt;br /&gt;AddMultiple(customers, &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer(), &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;&lt;br /&gt;    new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer(), &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer());&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;However, the method above only works with type &lt;customer&gt;. To have it work&lt;br /&gt;with any &lt;b&gt;List&lt;t&gt;&lt;/t&gt;&lt;/b&gt; , the method must be written as a generic method.&lt;br /&gt;A generic method has one or more &lt;b&gt;type parameters &lt;/b&gt;specified in &lt;span class=&quot;PKBHighlighted&quot;&gt;&lt;&lt;br /&gt;&lt;/span&gt;and &lt;span class=&quot;PKBHighlighted&quot;&gt;&gt; &lt;/span&gt;delimiters after the method name :&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; AddMultiple&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;T&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;(List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;T&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; customList, &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;params&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; T[] values)&lt;br /&gt;{&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; (T value &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; values)&lt;br /&gt;    {&lt;br /&gt;    customList.Add(value);&lt;br /&gt;    }&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/customer&gt;&lt;/pre&gt; Finally, we can add any type to generic List :&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; listInteger &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;();&lt;br /&gt;AddMultiple&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;(listInteger, &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;);&lt;br /&gt;&lt;br /&gt;List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Customer&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; customers &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Customer&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;;&lt;br /&gt;AddMultiple&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Customer&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;(customers, &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;&lt;br /&gt;               new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer(),&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;                new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer(),&lt;br /&gt;     &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;       new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer(),&lt;br /&gt;            &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer());&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;In the example above, since the first regular argument is type List&lt;int&gt;&lt;br /&gt;&lt;span class=&quot;PKBHighlighted&quot;&gt;listInteger&lt;/span&gt;, and the subsequent arguments are of type int &lt;span class=&quot;PKBHighlighted&quot;&gt;1, 2, 3 ,&lt;br /&gt;4 &lt;/span&gt;the compiler can reason that the type parameter must be int. Thus,&lt;br /&gt;we can use shorter syntax without specifying the type parameter&lt;br /&gt;(&lt;&lt;span class=&quot;PKBHighlighted&quot;&gt;int&lt;/span&gt;&gt;) :&lt;br /&gt;&lt;/int&gt;&lt;/pre&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; listInteger &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;();&lt;br /&gt;AddMultiple(listInteger, &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The same for the second scenario :&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Customer&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; customers &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Customer&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;();&lt;br /&gt;AddMultiple(customers,&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;         new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer(),&lt;br /&gt;         &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer(),&lt;br /&gt;         &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer(), &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;&lt;br /&gt;         new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer());&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/08/c-20-generic-methods.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-115691237272065087</guid><pubDate>Wed, 30 Aug 2006 04:29:00 +0000</pubDate><atom:updated>2009-06-05T16:44:49.801+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Dot Net</category><title>C# 2.0 : Constraints in Generics</title><description>&lt;span style=&quot;font-size:180%;&quot;&gt; Problem&lt;br /&gt;&lt;/span&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Dictionary&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;K, V&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;{&lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Add(K key, V value)&lt;br /&gt; {&lt;br /&gt;     ...&lt;br /&gt;     &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; (key.CompareTo(x) &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;) {...} &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; Error, no CompareTo method&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;        ...&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Since the type argument specified for K  could be any type, the&lt;br /&gt;only members that support CompareTo are  memberss that implement&lt;br /&gt;IComparable Interface such as Equals, GetHashCode, ToString...&lt;br /&gt;A Compile-time error occurs in the example above.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:180%;&quot;&gt;Solution&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Dictionary&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;K, V&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; where K: ICompareable&lt;br /&gt;{&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Add(K key, V value)&lt;br /&gt;  {&lt;br /&gt;      ...&lt;br /&gt;      &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; (key.CompareTo(x) &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;) {...}&lt;br /&gt;      ...&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;The Declaration above ensure that any type argument supplied for K&lt;br /&gt;is a type that implements IComparable. It is possible to specify&lt;br /&gt;any number of interface and type parameters as constraints :&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Dictionary&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;K, V&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;where K: ICompareable&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;K&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;, IPersistable&lt;br /&gt;where V: Entity&lt;br /&gt;{&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Add(K key, V value)&lt;br /&gt;  {&lt;br /&gt;      ...&lt;br /&gt;      &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; (key.CompareTo(x) &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;) {...}&lt;br /&gt;      ...&lt;br /&gt;  }&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/08/c-20-constraints-in-generics.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-115691211917251527</guid><pubDate>Wed, 30 Aug 2006 03:58:00 +0000</pubDate><atom:updated>2009-06-05T16:44:49.801+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Dot Net</category><title>C# 2.0 : How to create Generics</title><description>&lt;h3 id=&quot;genericClassWithOneParameter&quot;&gt;Generic Class with one parameter&lt;br /&gt;&lt;/h3&gt;This is a typical Non-generic Class :&lt;br /&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; List&lt;br /&gt;{&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;[] items;&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Add(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; item) {....}&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; index] {...}&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;Generic Class : in order to create generics class we use the &lt;b&gt;type argument &lt;/b&gt;&lt;b&gt;&lt;span class=&quot;PKBHighlighted&quot;&gt;T&lt;/span&gt;&lt;/b&gt; in &lt;span style=&quot;font-weight: bold;&quot; class=&quot;PKBHighlighted&quot;&gt;&lt;&lt;/span&gt; and &lt;b&gt;&lt;span class=&quot;PKBHighlighted&quot;&gt;&gt;&lt;/span&gt;&lt;/b&gt; after class name.&lt;br /&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;T&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;{&lt;br /&gt;  [T] items;&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Add(T item) {....}&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; T &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; index] {...}&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;Using Generic class :&lt;br /&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; listInteger &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;;&lt;br /&gt;listInteger.Add(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;);&lt;br /&gt;listInteger.Add(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;);&lt;br /&gt;listInteger.Add(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;);&lt;br /&gt;listInteger.Add(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer()); &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; Compile-time error&lt;span style=&quot;font-family:Georgia,serif;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p class=&quot;PKBContent&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Note&lt;/span&gt;:&lt;br /&gt;T : type argument.&lt;br /&gt;List&lt;int&gt; : is List of Integer type. The List&lt;int&gt; type is called a &lt;b&gt;constructed type&lt;/b&gt;. Every occurrence of T is replaced with the type argument int. When an  instance of List&lt;int&gt; is created, the native storage of the items array is an int[] rather than object[]. If we add a Customer into List&lt;int&gt; , then compiler will report error.&lt;/int&gt;&lt;/int&gt;&lt;/int&gt;&lt;/int&gt;&lt;/p&gt;&lt;h3 id=&quot;genericClassWithMoreThanOneParameters&quot;&gt;Generic Class with more than one parameters&lt;br /&gt;&lt;/h3&gt;Generic type declarations may have any number of type parameters. The List&lt;int&gt; example above has only one type parameter, but a generic &lt;b&gt;Dictionary &lt;/b&gt;class might have two type parameters, one for the type of keys and one for the type of values.&lt;br /&gt;&lt;br /&gt;&lt;/int&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Dictionary&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;K,V&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;{&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Add(K key, V value) {...}&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; V &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;[K key] {...}&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;When Dictionary&lt;k,v&gt; is used, two type arguments would have to be supplied :&lt;br /&gt;&lt;br /&gt;&lt;/k,v&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Dictionary&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;, Customer&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; dict &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;&lt;br /&gt;   new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Dictionary&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;, Customer&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;();&lt;br /&gt;dict.Add(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Hung&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer());&lt;br /&gt;Customer customer &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; dict[&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Hung&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;];&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/08/c-20-how-to-create-generics.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-115673674182525645</guid><pubDate>Mon, 28 Aug 2006 03:39:00 +0000</pubDate><atom:updated>2009-06-05T16:44:49.801+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Dot Net</category><title>C# 2.0 Generics</title><description>&lt;h1 class=&quot;heading&quot; id=&quot;genericsOverview&quot;&gt;Generics Overview&lt;br /&gt;&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Use generic types to maximize code reuse, type safety, and performance.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;The most common use of generics is to create collection classes.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;The .NET Framework class library contains several new generic collection classes in the &lt;b&gt;System.Collections.Generic &lt;/b&gt;namespace. These should be used whenever possible in place of classes such as &lt;b&gt;&lt;span class=&quot;linkTerms&quot;&gt;ArrayList &lt;/span&gt;&lt;/b&gt;in the &lt;b&gt;&lt;span class=&quot;linkTerms&quot;&gt;System.Collections&lt;/span&gt;&lt;/b&gt; namespace.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;You can create your own generic interfaces, classes, methods, events and delegates.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Generic classes may be constrained to enable access to methods on particular data types.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h1 id=&quot;whyGenerics&quot;&gt;Why Generics ?&lt;br /&gt;&lt;/h1&gt;&lt;h3 id=&quot;typeSafetyCastingPerformance&quot;&gt;Type safety casting &amp; performance:&lt;/h3&gt;    Using generics is not only safer than general old collection class (such as ArrayList, Collections...) but also significantly faster.&lt;br /&gt;&lt;br /&gt;C# 1.1 :&lt;br /&gt;&lt;pre class=&quot;Macro Code CSharpCode&quot; language=&quot;CSharp&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;ArrayList customers &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; ArrayList();&lt;br /&gt;Customer customer &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer();&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; Boxing --&gt; descrease performance. No type-checking&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;customers.Add(customer);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; Boxing --&gt; descrease performance. No type-checking&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;customers.Add(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Some string&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; throw exception&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; Customer customer = customers[0];&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;C# 2.0 :&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Customer&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; customers &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Customers&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;();&lt;br /&gt;Customer customer &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; Customer();&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; No Boxing, no casting --&gt; increase performance.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;customers.Add(customer);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; Type-Checking : Compile-time error&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;customers.Add(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Some string&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; No UnBoxing, no casting --&gt; increase performance .&lt;br /&gt;// Not throw exception&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Customer customer2 &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; customers[&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt; UnBoxing --&gt; decrease performance&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Customer customer2 &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; (customer)customers[&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;];&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/08/c-20-generics.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-115622175034775310</guid><pubDate>Tue, 22 Aug 2006 04:06:00 +0000</pubDate><atom:updated>2009-06-05T17:39:20.198+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.net</category><title>Asp.net 2.0 Profile problem in new Web Application Project model : ProfileCommon not found</title><description>I spent a lot of time to find out root of problem when using asp.net 2.0 Profile feature in new Web Application Project model. With VS 2005 Website model, when we edit Profile section&lt;br /&gt;in web.config, Vs 2005 will automatic generate strong-typed class ProfileCommon. Developers&lt;br /&gt;can use this generation class/ object by using intellisense feature of vs 2005.&lt;br /&gt;&lt;br /&gt;Web.config :&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://photos1.blogger.com/blogger/5079/872/1600/profileInwebconfig.0.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 389px; height: 111px;&quot; src=&quot;http://photos1.blogger.com/blogger/5079/872/400/profileInwebconfig.jpg&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Code-behind :&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://photos1.blogger.com/blogger/5079/872/1600/profileUseinCodeBehind.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;http://photos1.blogger.com/blogger/5079/872/400/profileUseinCodeBehind.jpg&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately, Web Application Project model does not automatic generate strong-typed&lt;br /&gt;ProfileCommon to mapping profile section in web.config. In order to use this Profile, we must hand coding mapping class :&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://photos1.blogger.com/blogger/5079/872/1600/handcodeProfileCommon.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;http://photos1.blogger.com/blogger/5079/872/400/handcodeProfileCommon.jpg&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Using ProfileCommon :&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://photos1.blogger.com/blogger/5079/872/1600/useProfileCommon.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;http://photos1.blogger.com/blogger/5079/872/400/useProfileCommon.jpg&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Hope next release of Web Application Project (SP1) will support automatic generate strong-typed Profile Mapping. Currently, we can do hand-coding or using &lt;a href=&quot;http://www.gotdotnet.com/Workspaces/Workspace.aspx?id=406eefba-2dd9-4d80-a48c-b4f135df4127&quot;&gt;WebProfile generator&lt;/a&gt; from Tim McBride&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/08/aspnet-20-profile-problem-in-new-web.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-115459682628320220</guid><pubDate>Thu, 03 Aug 2006 09:05:00 +0000</pubDate><atom:updated>2009-06-05T17:40:50.404+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL Server</category><title>T-SQL : How get only Time Part in DateTime  value</title><description>DECLARE @CurrentDate datetime&lt;br /&gt;   SET @CurrentDate = &#39;8/3/2006 4:09:00 PM&#39;&lt;br /&gt;   SET @CompareDate = &#39;8/3/2006 4:09:00 PM&#39;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Get Time part as nvarchar or char &lt;/span&gt;&lt;/span&gt;:&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;  Using :&lt;/span&gt;&lt;br /&gt; select right(convert(nvarchar,@CurrentDate,120),9)&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;    Or : &lt;/span&gt;&lt;br /&gt; SELECT Convert(CHAR(24), @CurrentDate,108)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;How to compare only time part in DateTime value , we use DatePart function :&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  DatePart(hour, @CurrentDate) &gt;= DatePart(hour, @CompareDate) AND&lt;br /&gt;  DatePart(minute, @CurrentDate) &gt;= DatePart(minute, @CompareDate) AND&lt;br /&gt;  DatePart(second, @CurrentDate) &gt;= DatePart(second, @CompareDate) AND&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/08/t-sql-how-get-only-time-part-in.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-115166149712118446</guid><pubDate>Fri, 30 Jun 2006 09:41:00 +0000</pubDate><atom:updated>2006-07-09T21:15:30.996+07:00</atom:updated><title>Recently Released Exams !</title><description>The following exams went live between April 14 and June 2, 2006 and are now available for registration at both Pearson VUE and Prometric sites around the world.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://photos1.blogger.com/blogger/5079/872/1600/newMCPExam20060630.1.jpg&quot;&gt;  &lt;/a&gt;&lt;table class=&quot;MsoTableGrid&quot; style=&quot;border: medium none ; border-collapse: collapse;&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;  &lt;tbody&gt;&lt;tr style=&quot;&quot;&gt;   &lt;td style=&quot;border: 1pt solid windowtext; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;70-235&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;English&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;TS: Developing Business Process and   Integration Solutions by Using Microsoft BizTalk Server 2006&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;&quot;&gt;   &lt;td style=&quot;border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;70-282&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;English&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;Designing, Deploying, and Managing a   Network Solution for a Small- and Medium-Sized Business&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;-moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; background-attachment: scroll;&quot;&gt;   &lt;td style=&quot;border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;70-442&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;English&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;PRO: Designing and Optimizing Data   Access by Using Microsoft SQL Server 2005&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;&quot;&gt;   &lt;td style=&quot;border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;70-526&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;English&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;TS: Microsoft.NET Framework 2.0 -   Windows-Based Client Development&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;-moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; background-attachment: scroll;&quot;&gt;   &lt;td style=&quot;border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;70-547&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;English&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;PRO: Designing and Developing Web-Based   Applications by Using the Microsoft.NET Framework &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;&quot;&gt;   &lt;td style=&quot;border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;70-548&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;English&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;PRO: Designing and Developing Microsoft   Windows-Based Applications by Using the Microsoft .NET Framework &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;-moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; background-attachment: scroll;&quot;&gt;   &lt;td style=&quot;border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;70-549&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;English&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;PRO: Designing and Developing &lt;st1:place st=&quot;on&quot;&gt;&lt;st1:city st=&quot;on&quot;&gt;Enterprise&lt;/st1:City&gt;&lt;/st1:place&gt; Applications   by Using the Microsoft.NET Framework &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;&quot;&gt;   &lt;td style=&quot;border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;70-551&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;English&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;UPGRADE: MCAD Skills to MCPD Web   Developer by Using the Microsoft.NET Framework&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;-moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; background-attachment: scroll;&quot;&gt;   &lt;td style=&quot;border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;70-552&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;English&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;UPGRADE: MCAD Skills to MCPD Windows   Developer by Using the Microsoft.NET Framework&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;&quot;&gt;   &lt;td style=&quot;border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;70-553&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;English&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;UPGRADE: MCSD Microsoft.NET Skills to   MCPD Enterprise Application Developer by Using the Microsoft .NET Framework:   Part 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;-moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; background-attachment: scroll;&quot;&gt;   &lt;td style=&quot;border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;70-554&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;English&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;UPGRADE: MCSD Microsoft.NET Skills to   MCPD Enterprise Application Developer by Using the Microsoft .NET Framework:   Part 2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;&quot;&gt;   &lt;td style=&quot;border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;71-262&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;English&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.05in;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 140%;&quot;&gt;&lt;span style=&quot;font-size: 8.5pt; line-height: 140%; font-family: Verdana;&quot;&gt;TS: Microsoft Office Live   Communications Server 2005 - Implementing, Managing, and Troubleshooting &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://photos1.blogger.com/blogger/5079/872/1600/newMCPExam20060630.1.jpg&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/06/recently-released-exams.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-114637584119415600</guid><pubDate>Sun, 30 Apr 2006 04:52:00 +0000</pubDate><atom:updated>2006-04-30T12:49:15.216+07:00</atom:updated><title>Microsoft Asia Security RoadShow 2006</title><description>I&#39;ve just received &quot;Microsoft Security RoadShow 2006&quot; Invitation from Microsoft, but the show will be taken in my working day , I&#39;m wondering should I go to this event&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://photos1.blogger.com/blogger/5079/872/1600/securityroadshow2006.jpg&quot;&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;http://photos1.blogger.com/blogger/5079/872/320/securityroadshow2006.jpg&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/04/microsoft-asia-security-roadshow-2006.html</link><author>noreply@blogger.com (hungle)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-114586994520743264</guid><pubDate>Mon, 24 Apr 2006 09:07:00 +0000</pubDate><atom:updated>2009-06-05T17:40:50.404+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL Server</category><title>SQL 2000 - SQL 2005 Database Upgrade : Database Diagrams problem</title><description>I restored Sql Server database 2005  from Sql Server 2000, then I want to add a new diagram, but when I click &quot;Database Diagrams&quot; there  an error message  &quot;Database diagram support objects cannot be installed because this database does not have a valid owner.  To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.  &quot;. Follow these steps to resolve this problem:&lt;br /&gt;1. Right Click on your database, choose properties&lt;br /&gt;2. Goto the Options Page&lt;br /&gt;3. In the Dropdown at right labeled &quot;Compatibility Level&quot; choose &quot;SQL&lt;br /&gt;Server 2005(90)&quot;&lt;br /&gt;4. Press OK.&lt;br /&gt;&lt;br /&gt;   The alternating method, you can run sthis store procedure:&lt;br /&gt;&lt;p&gt;&lt;span id=&quot;code&quot; style=&quot;;font-family:courier;font-size:85%;&quot;  &gt;&lt;span style=&quot;color: rgb(0, 0, 255);font-size:85%;&quot; &gt;EXEC&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0);font-size:85%;&quot; &gt;sp_dbcmptlevel&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);font-size:85%;&quot; &gt;&#39;yourDB&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 128);font-size:85%;&quot; &gt;,&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);font-size:85%;&quot; &gt;&#39;90&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 128);font-size:85%;&quot; &gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;GO&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);font-size:85%;&quot; &gt;ALTER&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);font-size:85%;&quot; &gt;AUTHORIZATION&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);font-size:85%;&quot; &gt;ON&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);font-size:85%;&quot; &gt;DATABASE&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 128);font-size:85%;&quot; &gt;::&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;yourDB &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);font-size:85%;&quot; &gt;TO&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &quot;yourLogin&quot;&lt;br /&gt;GO&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);font-size:85%;&quot; &gt;USE&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; [yourDB]&lt;br /&gt;GO&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);font-size:85%;&quot; &gt;EXECUTE&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);font-size:85%;&quot; &gt;AS&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);font-size:85%;&quot; &gt;USER&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 128);font-size:85%;&quot; &gt;=&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; N&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);font-size:85%;&quot; &gt;&#39;dbo&#39;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);font-size:85%;&quot; &gt;REVERT&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;GO&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/04/sql-2000-sql-2005-database-upgrade_24.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-114517969821564488</guid><pubDate>Sun, 16 Apr 2006 09:27:00 +0000</pubDate><atom:updated>2006-04-16T16:28:18.973+07:00</atom:updated><title>Team System Brings Project Management to Visual Studio</title><description>New features of Visual Studio 2005 Team System (VSTS) will help project managers in two ways: a set of built-in reports will allow project managers to quickly see project status and a set of extensible methodologies will provide specific guidance on how to organize and track a software development project. The reporting tools are useful for any development project that uses VSTS’s source-code control and work-item tracking systems. The methodologies, however, will require organizations to either adopt a specific way of managing their projects or modify the provided methodologies to suit their specific needs.  &lt;p&gt;For background information on VSTS, including its architecture, see &quot;Visual Studio Team System Targets Multiple Roles&quot; on page 20 of the Feb. 2005 &lt;i&gt;Update&lt;/i&gt;.&lt;/p&gt;  &lt;p class=&quot;ArticleSubhead1&quot;&gt;Tools for Project Managers&lt;/p&gt;  &lt;p&gt;Many software project managers spend a great deal of time collecting status information from individual developers and testers and trying to collate that information into a useful report. Development teams using the VSTS source-code control system and work-item tracking databases will find that much of that data collection is performed automatically, allowing project managers to perform higher-level tasks such as analyzing trends or transferring work from one developer to another to equalize work loads.&lt;/p&gt;  &lt;p&gt;VSTS can create reports from multiple data sources, including its automated code testing, source-code control, and work-item tracking systems, giving project managers a more complete view of their project. Some of the statistics that VSTS can generate include the following:&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Bug find and fix rates&lt;/b&gt; show the number of bugs found each day compared with the number fixed. The net number of bugs fixed each day is an important tool in helping project managers estimate when a project will reach its quality goals.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Code churn&lt;/b&gt; measures the number of lines of code in the project that are being added, deleted, or changed. Since any change to the source code of a project introduces the possibility of a bug, reducing code churn is important to stabilizing a project in preparation for release.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Bugs per developer &lt;/b&gt;allows project managers to see which developers are overloaded with bugs to fix and which have time available, helping managers balance the work load.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Number of test cases passing and failing&lt;/b&gt; is an important measure of the overall health of a project.&lt;/p&gt;    &lt;p&gt;&lt;b&gt;Code coverage &lt;/b&gt;shows what percentage of the application’s source code is being exercised by automated test suites and helps managers analyze the effectiveness of their tests. If large portions of the source code are not covered by any automated test, then a manager knows that the number of test cases passing will not provide a complete view of the quality of the application.&lt;br /&gt;&lt;/p&gt;  &lt;p class=&quot;ArticleSubhead2&quot;&gt;Reports Available in Many Formats&lt;/p&gt;  &lt;p&gt;Project managers can view and update project information in several ways.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Excel.&lt;/b&gt; Excel provides few project management features, but many software project managers rely on it, including those on Microsoft’s own product teams. What Excel excels at is creating, maintaining, and sorting lists of information and generating charts. VSTS allows project managers to view lists of work items within Excel spreadsheets. An Excel add-in can automatically update spreadsheets with the latest data and can update VSTS with any changes made to the spreadsheet.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Project. &lt;/b&gt;Although&lt;b&gt; &lt;/b&gt;Project is Microsoft’s product for general-purpose project management, it is rarely used for software project management. Nonetheless, Project has some capabilities that make it useful—most notably its support for visually displaying a project’s timeline as either a Gantt or a Pert chart. VSTS can automatically generate a Project file for a project schedule and includes a plug-in so that any schedule changes made within Project are reflected in VSTS.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Web site. &lt;/b&gt;Because the middle tier of VSTS is built on top of Windows SharePoint Services (WSS), every software project automatically has an associated SharePoint site that allows developers, testers, and project managers to view and update project data.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;SQL Reporting. &lt;/b&gt;The data tier of&lt;b&gt; &lt;/b&gt;VSTS uses SQL Server, so project managers will be able to use SQL Reporting Services to automatically generate and distribute reports, such as daily or weekly bug status.&lt;/p&gt;  &lt;p class=&quot;ArticleSubhead1&quot;&gt;Methodologies Provide Process Guidance&lt;/p&gt;  &lt;p&gt;In addition to providing reporting tools that are broadly useful to teams, VSTS provides mechanisms for enforcing specific development methodologies. Webster defines methodology as &quot;a body of methods, rules, and postulates employed by a discipline.&quot; A software development methodology, such as Extreme Programming, is a set of methods and rules that define how a software project is designed and created. Extreme Programming, for example, stresses the need for frequent, small releases of the project and the creation of software tests before the writing of code.&lt;/p&gt;  &lt;p&gt;The final version of VSTS will support two Microsoft-developed methodologies—one for a highly formalized software development process, and one for a less formalized, more iterative, process. Organizations can use or customize one of the methodologies supported by VSTS, use a methodology developed by themselves or by third parties, or use no methodology at all.&lt;/p&gt;  &lt;p&gt;In addition, Microsoft hopes to create a market for third parties to sell other popular methodologies, such as Extreme Programming.&lt;/p&gt;  &lt;p class=&quot;ArticleSubhead2&quot;&gt;Agile Framework Defines Roles, Workstreams&lt;/p&gt;  &lt;p&gt;Beta 2 of Visual Studio 2005 (which will be the first beta of VSTS) will include one Microsoft methodology, Microsoft Solutions Framework (MSF) for Agile Software Development (previously known as MSF Agile). The Agile methodology defines a software development process that incorporates several rounds, or iterations, of product planning, coding, testing, and feedback. Although Agile can be used by any development team, it was designed with a typical IT enterprise development team in mind.&lt;/p&gt;  &lt;p&gt;The Agile methodology defines several roles, with each member of the team taking on one or more roles:&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Architect&lt;/b&gt;—responsible for designing the technical foundations of the application, including its usability, reliability, maintainability, performance, and security.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Business analyst&lt;/b&gt;—responsible for defining the business needs the application fulfills and working with customers to understand the scenarios and quality of service requirements.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Project manager&lt;/b&gt;—responsible for delivering the application on time and within budget.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Developer&lt;/b&gt;—responsible for implementing the application within the agreed schedule.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Tester&lt;/b&gt;—responsible for assessing and communicating the state of the application, including any problems.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Release manager&lt;/b&gt;—responsible for the rollout of the application, coordinating the project with other operations, and certifying any releases for shipment or deployment.&lt;/p&gt;  &lt;p&gt;In addition to defining roles, the Agile methodology defines a set of activities performed by each role. For example, the &quot;Fix a Bug&quot; activity is associated with the developer role. These activities are then grouped into &lt;i&gt;workstreams&lt;/i&gt; that span roles. The &quot;Fix a Bug&quot; activity, for example, is part of a larger workstream that includes the following steps:   &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Open a bug (tester)&lt;/li&gt;&lt;li&gt;Triage bugs (project manager)&lt;/li&gt;&lt;li&gt;Fix a bug (developer)&lt;/li&gt;&lt;li&gt;Verify a fix (tester)&lt;/li&gt;&lt;li&gt;Close a bug (tester)&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;VSTS supports this methodology by automatically updating a work item, assigning it from one person to the next as it moves through a workstream. In the case of a bug, once a bug is entered by a tester, a work item is automatically created for the project manager to triage the bug. Similarly, once a bug is fixed, the work item is assigned to the tester for verification.&lt;/p&gt;  &lt;p class=&quot;ArticleSubhead2&quot;&gt;CMMI Coming Later&lt;/p&gt;  &lt;p&gt;In addition to the Agile framework, future versions of VSTS will also provide the Microsoft Solutions Framework for CMMI Process Improvement—a more formal methodology that is compliant with the Capability Maturity Model Integration (CMMI), a set of process management guidelines developed by Carnegie Mellon University’s Software Engineering Institute. Although seldom used by corporate IT departments and broad-market commercial software developers, some government organizations require that their vendors adhere to CMMI guidelines.&lt;/p&gt;  &lt;p&gt;CMMI defines five maturity levels, ranging from Level 1 (ad hoc) to Level 5 (optimizing). Microsoft hopes to have a methodology for Visual Studio (VS) 2005 that meets the requirement for CMMI Level 3, which requires that &quot;the standard process for developing and maintaining software across the organization is documented, including both software engineering and management processes, and these processes are integrated into a coherent whole.&quot;&lt;/p&gt;  &lt;p&gt;Microsoft has yet to provide details on the CMMI framework, but has said that support will not be included in Beta 2 of VS 2005, expected in Apr. 2005.&lt;/p&gt;  &lt;p class=&quot;ArticleSubhead2&quot;&gt;You Can Go Your Own Way&lt;/p&gt;  &lt;p&gt;Adopting a methodology, whether defined by Microsoft or by a third party, is a significant undertaking. Every development team has some &quot;rules of the road&quot;—they may not be formalized or even written down, but they exist nonetheless, and managers will need to understand their team’s current processes before adopting new, more complex, ones.&lt;/p&gt;  &lt;p&gt;In addition, the methodologies used by VSTS are defined by a complex XML schema and modifying them (or creating new methodologies) not only requires specific knowledge of VSTS but of XML as well. Most organizations will want to rely on outside consultants or trainers to do this work.&lt;/p&gt;  &lt;p class=&quot;ArticleSubhead1&quot;&gt;Resources&lt;/p&gt;  &lt;p&gt;&lt;b&gt;The VSTS source-code control system&lt;/b&gt; is outlined in &quot;VS 2005 Checks in New Source Control&quot; on page 24 of the Feb. 2005 &lt;i&gt;Update&lt;/i&gt;.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;VS 2005 features for individual developers&lt;/b&gt; are described in &quot;Visual Studio Renews Pitch for Developers&quot; on page 21 of the Dec. 2004 &lt;i&gt;Update&lt;/i&gt;.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;The Visual Studio Team System home page&lt;/b&gt; is &lt;a href=&quot;http://lab.msdn.microsoft.com/teamsystem/default.aspx&quot; class=&quot;ArticleTextLink&quot;&gt;lab.msdn.microsoft.com/teamsystem/default.aspx&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;For more information on CMMI,&lt;/b&gt; see &lt;a href=&quot;http://www.sei.cmu.edu/cmmi&quot; class=&quot;ArticleTextLink&quot;&gt;www.sei.cmu.edu/cmmi&lt;/a&gt;.&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/04/team-system-brings-project-management.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-114284103980249615</guid><pubDate>Mon, 20 Mar 2006 07:48:00 +0000</pubDate><atom:updated>2006-03-20T14:50:39.823+07:00</atom:updated><title>New MCP exam betas already underway</title><description>&lt;table border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Number&lt;/b&gt; &lt;/td&gt; &lt;td&gt;&lt;b&gt;Cert&lt;/b&gt; &lt;/td&gt; &lt;td&gt;&lt;b&gt;Beta&lt;/b&gt; &lt;/td&gt; &lt;td&gt;&lt;b&gt;Full Name&lt;/b&gt; &lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;70-235 &lt;/td&gt; &lt;td&gt;MCTS &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Developing Business Process and Integration Solutions Using BizTalk Server 2006 &lt;span style=&quot;font-size:78%;&quot;&gt;1&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;&lt;a href=&quot;http://www.microsoft.com/learning/exams/70-431.asp&quot;&gt;70-431&lt;/a&gt; &lt;/td&gt; &lt;td&gt;MCTS &lt;/td&gt; &lt;td&gt;11/22-12/5/05 &lt;/td&gt; &lt;td&gt;SQL Server 2005 Implementation &amp; Maintenance&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;&lt;a href=&quot;http://www.microsoft.com/learning/exams/70-441.asp&quot;&gt;70-441&lt;/a&gt; &lt;/td&gt; &lt;td&gt;MCITP &lt;/td&gt; &lt;td&gt;11/22-12/5/05 &lt;/td&gt; &lt;td&gt;Designing Database Solutions Using SQL Server 2005&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;70-442 &lt;/td&gt; &lt;td&gt;MCITP &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Designing and Optimizing Data Access Using Microsoft SQL Server 2006 &lt;span style=&quot;font-size:78%;&quot;&gt;1&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;&lt;a href=&quot;http://www.microsoft.com/Learning/exams/70-443.asp&quot;&gt;70-443&lt;/a&gt; &lt;/td&gt; &lt;td&gt;MCITP &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Designing a Database Server Infrastructure by Using Microsoft SQL Server 2005&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;&lt;a href=&quot;http://www.microsoft.com/Learning/exams/70-444.asp&quot;&gt;70-444&lt;/a&gt; &lt;/td&gt; &lt;td&gt;MCITP &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Optimizing and Maintaining a Database Administration Solution by Using Microsoft SQL Server 2005&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;70-445 &lt;/td&gt; &lt;td&gt;MCITP &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Designing Business Intelligence Solutions by Using Microsoft SQL Server 2005 Analysis Services&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;70-446 &lt;/td&gt; &lt;td&gt;MCITP &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Designing a Business Intelligence Infrastructure by Using Microsoft SQL Server 2005&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;70-447 &lt;/td&gt; &lt;td&gt;MCITP &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Upgrade: MCDBA Skills to MCITP Database Administrator by Using Microsoft SQL Server 2005 &lt;span style=&quot;font-size:78%;&quot;&gt;1&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;70-526 &lt;/td&gt; &lt;td&gt;MCTS &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Microsoft .NET Framework 2.0 Windows-based Client Development &lt;span style=&quot;font-size:78%;&quot;&gt;1&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;&lt;a href=&quot;http://www.microsoft.com/learning/exams/70-528.asp&quot;&gt;70-528&lt;/a&gt; &lt;/td&gt; &lt;td&gt;MCTS &lt;/td&gt; &lt;td&gt;11/7-18/05 &lt;/td&gt; &lt;td&gt;Microsoft .NET Framework 2.0 Web -based Client Development&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;70-529 &lt;/td&gt; &lt;td&gt;MCTS &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Microsoft .NET Framework 2.0 Distributed Application Development&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;70-536 &lt;/td&gt; &lt;td&gt;MCTS &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Microsoft .NET Framework 2.0 Application Development Foundation &lt;span style=&quot;font-size:78%;&quot;&gt;1&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;70-547 &lt;/td&gt; &lt;td&gt;MCPD &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Designing and Developing Web Applications by Using the Microsoft .NET Framework &lt;span style=&quot;font-size:78%;&quot;&gt;2&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;70-548 &lt;/td&gt; &lt;td&gt;MCPD &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Designing and Developing Windows Applications by Using the Microsoft .NET Framework &lt;span style=&quot;font-size:78%;&quot;&gt;2&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;70-549 &lt;/td&gt; &lt;td&gt;MCPD &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Designing and Developing Enterprise Applications by Using the Microsoft .NET Framework &lt;span style=&quot;font-size:78%;&quot;&gt;2&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;70-551 &lt;/td&gt; &lt;td&gt;MCPD &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Upgrade: MCAD skills to MCPD: Web Developer by Using the Microsoft .NET Framework &lt;span style=&quot;font-size:78%;&quot;&gt;2&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;70-552 &lt;/td&gt; &lt;td&gt;MCPD &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Upgrade: MCAD skills to MCPD: Windows Developer by Using the Microsoft .NET Framework &lt;span style=&quot;font-size:78%;&quot;&gt;2&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;70-553 &lt;/td&gt; &lt;td&gt;MCPD &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Upgrade: MCSD Microsoft .NET skills to MCPD: Enterprise Application Developer by Using the Microsoft .NET Framework Part 1 &lt;span style=&quot;font-size:78%;&quot;&gt;3&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;70-554 &lt;/td&gt; &lt;td&gt;MCPD &lt;/td&gt; &lt;td&gt;NA &lt;/td&gt; &lt;td&gt;Upgrade: MCSD Microsoft .NET skills to MCPD: Enterprise Application Developer by Using the Microsoft .NET Framework Part 2 &lt;span style=&quot;font-size:78%;&quot;&gt;3&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;i&gt;&lt;span style=&quot;font-size:78%;&quot;&gt;Table notes:&lt;br /&gt;1. Microsoft Web page says &quot;available early 2006.&quot;&lt;br /&gt;2. Microsoft Web page says &quot;available mid-2006.&quot;&lt;br /&gt;3. Microsoft Web page says &quot;available summer 2006.&quot;&lt;/span&gt;&lt;/i&gt;  &lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/03/new-mcp-exam-betas-already-underway.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-114195943887822401</guid><pubDate>Fri, 10 Mar 2006 02:50:00 +0000</pubDate><atom:updated>2006-03-10T09:57:18.893+07:00</atom:updated><title>New Generation of Microsoft Certification Exams Released (Worldwide)</title><description>If you&#39;ve been looking forward to taking the New Generation of Microsoft Certification Exams, your wait is over. The following seven exams are now available at our testing providers.                                    &lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;                                     &lt;tbody&gt;&lt;tr&gt;                                        &lt;td style=&quot;color: rgb(166, 166, 166); font-size: 11px; padding-right: 4px; padding-bottom: 10px;&quot; align=&quot;right&quot; valign=&quot;top&quot;&gt;•&lt;/td&gt;                                       &lt;td valign=&quot;top&quot; width=&quot;100%&quot;&gt;                                         &lt;div style=&quot;font-size: 11px; padding-bottom: 10px;&quot;&gt;                                           &lt;a href=&quot;http://go.microsoft.com/?linkid=4633241&quot; target=&quot;_blank&quot; onclick=&quot;return top.js.OpenExtLink(window,event,this)&quot;&gt;Exam 70-528: TS: Microsoft .NET Framework 2.0 - Web-Based Client Development&lt;/a&gt;                                         &lt;/div&gt;                                       &lt;/td&gt;                                     &lt;/tr&gt;                                     &lt;tr&gt;                                       &lt;td style=&quot;color: rgb(166, 166, 166); font-size: 11px; padding-right: 4px; padding-bottom: 10px;&quot; align=&quot;right&quot; valign=&quot;top&quot;&gt;•&lt;/td&gt;                                       &lt;td valign=&quot;top&quot; width=&quot;100%&quot;&gt;                                         &lt;div style=&quot;font-size: 11px; padding-bottom: 10px;&quot;&gt;                                           &lt;a href=&quot;http://go.microsoft.com/?linkid=4633242&quot; target=&quot;_blank&quot; onclick=&quot;return top.js.OpenExtLink(window,event,this)&quot;&gt;Exam 70-431: TS: Microsoft SQL Server 2005 - Implementation and Maintenance&lt;/a&gt;                                         &lt;/div&gt;                                       &lt;/td&gt;                                     &lt;/tr&gt;                                     &lt;tr&gt;                                       &lt;td style=&quot;color: rgb(166, 166, 166); font-size: 11px; padding-right: 4px; padding-bottom: 10px;&quot; align=&quot;right&quot; valign=&quot;top&quot;&gt;•&lt;/td&gt;                                       &lt;td valign=&quot;top&quot; width=&quot;100%&quot;&gt;                                         &lt;div style=&quot;font-size: 11px; padding-bottom: 10px;&quot;&gt;                                           &lt;a href=&quot;http://go.microsoft.com/?linkid=4633243&quot; target=&quot;_blank&quot; onclick=&quot;return top.js.OpenExtLink(window,event,this)&quot;&gt;Exam 70-536: TS: Microsoft .NET Framework 2.0 - Application Development Foundation&lt;/a&gt;                                         &lt;/div&gt;                                        &lt;/td&gt;                                     &lt;/tr&gt;                                     &lt;tr&gt;                                       &lt;td style=&quot;color: rgb(166, 166, 166); font-size: 11px; padding-right: 4px; padding-bottom: 10px;&quot; align=&quot;right&quot; valign=&quot;top&quot;&gt;•&lt;/td&gt;                                       &lt;td valign=&quot;top&quot; width=&quot;100%&quot;&gt;                                         &lt;div style=&quot;font-size: 11px; padding-bottom: 10px;&quot;&gt;                                           &lt;a href=&quot;http://go.microsoft.com/?linkid=4633244&quot; target=&quot;_blank&quot; onclick=&quot;return top.js.OpenExtLink(window,event,this)&quot;&gt;Exam 70-441: PRO: Designing Database Solutions by Using Microsoft SQL Server 2005&lt;/a&gt;                                         &lt;/div&gt;                                       &lt;/td&gt;                                     &lt;/tr&gt;                                     &lt;tr&gt;                                       &lt;td style=&quot;color: rgb(166, 166, 166); font-size: 11px; padding-right: 4px; padding-bottom: 10px;&quot; align=&quot;right&quot; valign=&quot;top&quot;&gt;•&lt;/td&gt;                                        &lt;td valign=&quot;top&quot; width=&quot;100%&quot;&gt;                                         &lt;div style=&quot;font-size: 11px; padding-bottom: 10px;&quot;&gt;                                           &lt;a href=&quot;http://go.microsoft.com/?linkid=4633245&quot; target=&quot;_blank&quot; onclick=&quot;return top.js.OpenExtLink(window,event,this)&quot;&gt;Exam 70-443: PRO: Designing a Database Server Infrastructure by Using Microsoft SQL Server 2005&lt;/a&gt;                                         &lt;/div&gt;                                       &lt;/td&gt;                                     &lt;/tr&gt;                                     &lt;tr&gt;                                       &lt;td style=&quot;color: rgb(166, 166, 166); font-size: 11px; padding-right: 4px; padding-bottom: 10px;&quot; align=&quot;right&quot; valign=&quot;top&quot;&gt;•&lt;/td&gt;                                       &lt;td valign=&quot;top&quot; width=&quot;100%&quot;&gt;                                         &lt;div style=&quot;font-size: 11px; padding-bottom: 10px;&quot;&gt;                                           &lt;a href=&quot;http://go.microsoft.com/?linkid=4633246&quot; target=&quot;_blank&quot; onclick=&quot;return top.js.OpenExtLink(window,event,this)&quot;&gt;Exam 70-444: PRO: Optimizing and  Maintaining a Database Administration Solution by Using Microsoft SQL Server 2005&lt;/a&gt;                                         &lt;/div&gt;                                       &lt;/td&gt;                                     &lt;/tr&gt;                                     &lt;tr&gt;                                       &lt;td style=&quot;color: rgb(166, 166, 166); font-size: 11px; padding-right: 4px; padding-bottom: 10px;&quot; align=&quot;right&quot; valign=&quot;top&quot;&gt;•&lt;/td&gt;                                       &lt;td valign=&quot;top&quot; width=&quot;100%&quot;&gt;                                         &lt;div style=&quot;font-size: 11px; padding-bottom: 10px;&quot;&gt;                                           &lt;a href=&quot;http://go.microsoft.com/?linkid=4633247&quot; target=&quot;_blank&quot; onclick=&quot;return top.js.OpenExtLink(window,event,this)&quot;&gt;Exam 70-447: UPGRADE: MCDBA Skills to MCITP Database Administrator by Using Microsoft SQL Server 2005&lt;/a&gt;                                         &lt;/div&gt;                                       &lt;/td&gt;                                     &lt;/tr&gt;                                   &lt;/tbody&gt;&lt;/table&gt;                                    &lt;span style=&quot;overflow: hidden;&quot;&gt;                                   &lt;/span&gt;                                   &lt;div style=&quot;padding: 0px 0px 1em; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px; line-height: 140%;&quot;&gt;New Generation certificates will begin delivery at the end of March. New Generation credential member kits will begin delivery in early May 2006.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/03/new-generation-of-microsoft.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-114058314698985322</guid><pubDate>Wed, 22 Feb 2006 04:36:00 +0000</pubDate><atom:updated>2006-02-22T11:39:07.013+07:00</atom:updated><title>Security Application Block in Enterprise Library</title><description>&lt;div class=&quot;postcontent&quot;&gt;    &lt;p&gt;&lt;a href=&quot;http://msdn.microsoft.com/library/en-us/dnpag2/html/security1.asp?frame=true&quot;&gt;Security Application Block&lt;/a&gt; in &lt;a href=&quot;http://msdn.microsoft.com/library/en-us/dnpag2/html/entlib.asp?frame=true&quot;&gt;Enterprise Library&lt;/a&gt; provides a few advantages over the old application block. It looks like it will be a lot simpler to use. Notably, it no longer appears designed around &lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/authorization_manager_model.asp&quot;&gt;Authorization Manager&lt;/a&gt;’s peculiarities. In fact, it comes with an authorization implementation that does not depend on &lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/authorization_manager_model.asp&quot;&gt;Authorization Manager&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;There are a few concepts to understand when using the Security Application Blocks:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;Authentication  &lt;/li&gt;&lt;li&gt;Authorization  &lt;/li&gt;&lt;li&gt;Roles  &lt;/li&gt;&lt;li&gt;Profiles&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Every person or system that interacts with your application will claim to have some rights to perform certain actions. &lt;b&gt;Authentication&lt;/b&gt; is the process of verifying that the person or system is truly the user they are claiming to be. Most systems authenticate users using a username and password combination.&lt;/p&gt; &lt;p&gt;After the user is authenticated, your application must determine what actions or operations the user is allowed to execute. This is called &lt;b&gt;authorization&lt;/b&gt; and in Enterprise Library is role-based.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Roles&lt;/b&gt; are assigned to users to define how they will use the application. The authorization system can check the user’s assigned roles to determine what actions or operations the user is allowed to execute.&lt;/p&gt; &lt;p&gt;The Security Application Block also provides a facility for storing &lt;b&gt;profile&lt;/b&gt; information for each user. A profile can consist of primitive values, serializable objects or a dictionary of primitive values and serializable objects.&lt;/p&gt; &lt;p&gt;One of the new things in the security block is a simple backend database to store user, role and profile information. This removes the dependency of having an Active Directory database and Authorization Manager installed. You can start from this simple database and then upgrade to AD an AzMan in production, if required.&lt;/p&gt; &lt;p&gt;One thing I could not find is the actual provider for Authenticating against Active Directory. It must be in there, right? &lt;/p&gt;   &lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/02/security-application-block-in.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-113904559521621994</guid><pubDate>Sat, 04 Feb 2006 09:32:00 +0000</pubDate><atom:updated>2006-02-04T16:33:15.236+07:00</atom:updated><title>[patterns &amp; practices: Enterprise Library] Announcement: Enterprise Library for .NET Framework 2.0 Now Available!</title><description>&lt;a href=&quot;http://msdn.microsoft.com/library/?url=/library/en-us/dnpag2/html/EntLib2.asp&quot; target=&quot;_blank&quot; onclick=&quot;return top.js.OpenExtLink(window,event,this)&quot;&gt;Enterprise Library for .NET Framework 2.0 Now Available!&lt;/a&gt; The long-awaited update to Enterprise Library for .NET Framework 2.0 is now available - the official release is branded January 2006. This release of Enterprise Library includes six application blocks (Caching, Cryptography, Data Access, Exception Handling, Logging and Security), and provides similar functionality to the previous releases for the .NET Framework 1.1; however, Enterprise Library has been redesigned to use the new capabilities of the .NET Framework 2.0.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2006/02/patterns-practices-enterprise-library.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-113117870343687832</guid><pubDate>Sat, 05 Nov 2005 23:18:00 +0000</pubDate><atom:updated>2005-11-05T15:18:23.446+07:00</atom:updated><title>The new generation of Microsoft Certifications</title><description>Today, I&#39;ve just received MCP newsletter from Microsoft :&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;font-size:-1;&quot;&gt;Dear Microsoft Certified Professional:&lt;br /&gt;&lt;br /&gt;You already know about the newest versions of Microsoft® SQL Server™, Microsoft Visual Studio®, and Microsoft BizTalk® Server. We&#39;d also like you to know that we&#39;re complementing these new products by introducing new Microsoft Certifications.&lt;br /&gt;&lt;br /&gt;Consisting of four credentials in three series, the new generation of Microsoft Certifications provides IT managers with a simpler and more targeted framework to validate your skills. Better yet, they give you a tool to showcase your skills in a more relevant, more flexible, and more cost-effective way. And, as Microsoft releases new products, we&#39;ll introduce additional certifications.&lt;br /&gt;&lt;br /&gt;The enhancements to Microsoft Certifications are based on extensive customer feedback and research. However, it&#39;s important to note that the hard work you&#39;ve done in the past will continue to be recognized—Microsoft Certified Professionals will not be required to renew their current credentials, and your current credentials will remain valid. What&#39;s more, MCDBAs, MCADs and MCSDs on Visual Studio .NET enjoy straightforward upgrade paths for achieving new Microsoft Certifications in early 2006.&lt;br /&gt;&lt;br /&gt;Microsoft Certified Professionals are a key component of the Microsoft family. During the last twelve years, over three million Microsoft Certifications have been issued—making this the largest certification program in the IT industry. The goal of this new program is simply to improve the value of your certification—for you as well as for the IT and hiring managers who rely on them.&lt;br /&gt;&lt;br /&gt;To learn more, please read the informative FAQ at &lt;a target=&quot;_blank&quot; href=&quot;http://response.microsoft.com/P/v3/r.asp?r=T1_Url0&amp;e=101391%3B394850%3B9119055%3B2%3B02&amp;amp;a=1007&quot;&gt;&lt;span style=&quot;color:#005825;&quot;&gt;www.microsoft.com/learning/mcp/newgen/faq&lt;/span&gt;&lt;/a&gt; or visit the new generation of Microsoft Certification website at &lt;a target=&quot;_blank&quot; href=&quot;http://response.microsoft.com/P/v3/r.asp?r=T1_Url1&amp;e=101391%3B394850%3B9119055%3B2%3B02&amp;amp;a=1007&quot;&gt;&lt;span style=&quot;color:#005825;&quot;&gt;www.microsoft.com/learning/mcp/newgen&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;&lt;img src=&quot;http://response.microsoft.com/p/100017/101391/sig.gif&quot; height=&quot;76&quot; width=&quot;100&quot; /&gt;&lt;br /&gt;Lutz Ziob&lt;br /&gt;General Manager,&lt;br /&gt;Microsoft Learning&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;************************************************************************************************************************&lt;br /&gt; I will try to get new certification as soon as they release, want to be one of first MCPD in the World&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2005/11/new-generation-of-microsoft.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-112644969145217808</guid><pubDate>Sun, 11 Sep 2005 14:40:00 +0000</pubDate><atom:updated>2009-06-05T17:40:50.404+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL Server</category><title>ASP.NET Today: Smart Delete</title><description>&lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;strong&gt;DetailsView&lt;/strong&gt; and &lt;strong&gt;FormView&lt;/strong&gt; controls support &lt;b style=&quot;color: black; background-color: rgb(153, 255, 153);&quot;&gt;delete&lt;/b&gt; operations and delegate the execution to the underlying data source control. If the data source control is configured to execute the &lt;b style=&quot;color: black; background-color: rgb(153, 255, 153);&quot;&gt;delete&lt;/b&gt; operation, all works fine, otherwise an exception is thrown. &lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt; &lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;The &lt;strong&gt;DetailsView&lt;/strong&gt; generates command buttons automatically and doesn&#39;t expose them directly to page code. How can you add a bit of Javascript code to ask for confirmation? Here&#39;s the code.&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; DetailsView1_ItemCreated(&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; sender, &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;EventArgs&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; e)&lt;br /&gt;{&lt;br /&gt;   &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008000;&quot;&gt;// Test FooterRow to make sure all rows have been created&lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008000;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; (DetailsView1.FooterRow != &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;)&lt;br /&gt;   {&lt;br /&gt;     &lt;span style=&quot;font-size:85%;color:#008000;&quot;&gt;// The command bar is the last element in the Rows collection&lt;br /&gt;&lt;/span&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; commandRowIndex = DetailsView1.Rows.Count-1;&lt;br /&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;DetailsViewRow&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; commandRow = DetailsView1.Rows[commandRowIndex];&lt;br /&gt;    &lt;br /&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008000;&quot;&gt;// Look for the &lt;b style=&quot;color: black; background-color: rgb(153, 255, 153);&quot;&gt;DELETE&lt;/b&gt; button&lt;br /&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;DataControlFieldCell&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; cell = (&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;DataControlFieldCell&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;) commandRow.Controls[0];&lt;br /&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;Control&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; ctl &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; cell.Controls)&lt;br /&gt;     {&lt;br /&gt;       &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;LinkButton&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; link = ctl &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;LinkButton&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;;&lt;br /&gt;       &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; (link != &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;)&lt;br /&gt;       {&lt;br /&gt;          &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; (link.CommandName == &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;&quot;&lt;b style=&quot;color: black; background-color: rgb(153, 255, 153);&quot;&gt;Delete&lt;/b&gt;&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;)&lt;br /&gt;          {&lt;br /&gt;             link.ToolTip = &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;&quot;Click here to &lt;b style=&quot;color: black; background-color: rgb(153, 255, 153);&quot;&gt;delete&lt;/b&gt;&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;;&lt;br /&gt;             link.OnClientClick = &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;&quot;return &lt;b style=&quot;color: black; background-color: rgb(160, 255, 255);&quot;&gt;confirm&lt;/b&gt;(&#39;Do you really want to &lt;b style=&quot;color: black; background-color: rgb(153, 255, 153);&quot;&gt;delete&lt;/b&gt; this record?&#39;);&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;;&lt;br /&gt;          }&lt;br /&gt;       }&lt;br /&gt;    }&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt; &lt;/span&gt;&lt;/span&gt; &lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;The &lt;em&gt;ItemCreated&lt;/em&gt; event doesn&#39;t provide any information about the row being created. However, it can be figured out that the footer row is always created and is always the last row to be created. If the &lt;em&gt;FooterRow&lt;/em&gt; object is not null, you can conclude that all rows have been created, including the command bar. The command bar is the first row after the data rows and is stored in the &lt;em&gt;Rows&lt;/em&gt; collection--it&#39;s the last element in the collection. The command bar is a table row (type is &lt;em&gt;DetailsViewRow&lt;/em&gt;) and contains a cell (type is &lt;em&gt;DataControlFieldCell&lt;/em&gt;). The cell contains as many link buttons (type is &lt;em&gt;DataControlLinkButton&lt;/em&gt;) as there are commands. &lt;b style=&quot;color: black; background-color: rgb(153, 255, 153);&quot;&gt;Delete&lt;/b&gt;, Edit, New, Update, Cancel are the command names used and useful to identify the right button.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt; &lt;/span&gt;&lt;/span&gt; &lt;hr /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt; &lt;/span&gt;&lt;/span&gt; &lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;The &lt;strong&gt;FormView&lt;/strong&gt; is fully templated and lets you manually define appearance and behavior of command buttons. If you place a custom button, or want to use a custom command name for a standard button (Edit, New, &lt;b style=&quot;color: black; background-color: rgb(153, 255, 153);&quot;&gt;Delete&lt;/b&gt;), here&#39;s how to detect the click on the button. You start by adding a handler for &lt;em&gt;ItemCommand&lt;/em&gt;. The code below shows how to deal with a custom &lt;b style=&quot;color: black; background-color: rgb(153, 255, 153);&quot;&gt;Delete&lt;/b&gt; button that checks if the bound data source control is enabled for deletion before proceeding.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt; &lt;/span&gt;&lt;/span&gt; &lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; FormView1_ItemCommand(&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; sender, &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;FormViewCommandEventArgs&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt; e)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; (e.CommandName == &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;&quot;SmartDelete&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;  {&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;    IDataSource&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; obj = (&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;IDataSource&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;) FindControl(FormView1.DataSourceID);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;    DataSourceView&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; view = obj.GetView(&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;&quot;DefaultView&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;font-size:85%;color:#0000ff;&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt; (!view.CanDelete) {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;       Response.Write(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;font-size:85%;color:#800000;&quot;&gt;&quot;Sorry, you can&#39;t &lt;b style=&quot;color: black; background-color: rgb(153, 255, 153);&quot;&gt;delete&lt;/b&gt;&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;);&lt;br /&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;font-size:85%;color:#0000ff;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;    }&lt;br /&gt;    &lt;span style=&quot;color:#0000ff;&quot;&gt;else&lt;/span&gt;&lt;br /&gt;       FormView1.DeleteItem();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;  }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2005/09/aspnet-today-smart-delete.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-112568347077977840</guid><pubDate>Fri, 02 Sep 2005 17:47:00 +0000</pubDate><atom:updated>2005-09-03T00:53:13.536+07:00</atom:updated><title>August CTP of Enterprise Library for .NET Framework 2.0 - Now available</title><description>I&#39;ve waited for this long time , now I can use it for Connected systems developer Competition , I&#39;m so busy (extreme busy ) now, must finish first milestone , I&#39;ve just two week ahead, must submit application on 15th september . Oh , no. I&#39;m sleeping 5 hours a day. Terrible month, must go to holiday next month to relax.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2005/09/august-ctp-of-enterprise-library-for.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-10982778.post-112486655255629082</guid><pubDate>Wed, 24 Aug 2005 20:49:00 +0000</pubDate><atom:updated>2005-08-24T13:55:52.563+07:00</atom:updated><title>GTalk !</title><description>Gsearch (aka google) , Gmail, Gmap... and now &lt;a href=&quot;http://www.google.com/talk/&quot;&gt;GTalk&lt;/a&gt; . Google want to rule the world, and what will happend next ?  GGirl someday ^_^&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-3285494640947731&quot;;
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = &quot;120x600_as&quot;;
google_ad_type = &quot;text_image&quot;;
google_ad_channel =&quot;&quot;;
google_color_border = &quot;578A24&quot;;
google_color_bg = &quot;CCFF99&quot;;
google_color_link = &quot;00008B&quot;;
google_color_url = &quot;00008B&quot;;
google_color_text = &quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
  src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://lethanhhung.blogspot.com/2005/08/gtalk.html</link><author>noreply@blogger.com (hungle)</author><thr:total>0</thr:total></item></channel></rss>