Geeks With Blogs
Changhong's Technical Blog C#
Code smell – many usings
Normal 0 false false false EN-US ZH-CN X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; ......

Posted On Friday, November 28, 2008 9:55 AM

C# quiz - try-finally
So what is the output for following program? public class SimpleTest { public static void Main(string[] args) { Console.WriteLine(GetString... Console.ReadLine(); } private static string GetString() { string str = "original string"; try { return str; } finally { str = "changed in finally"; } } } It looks very simple, but most of my developer friends and I all had the wrong answer. In the college, we were all told that finally block is guaranteed to be executed before a method returns, right? So ......

Posted On Thursday, November 27, 2008 9:01 PM

Copyright © Changhong Fu | Powered by: GeeksWithBlogs.net | Join free