The C# team posts answers to common questions
August 2004 - Posts
-
The following code won't work, because conn goes out of scope before you enter the catch block. try { Connection conn = new Connection(); conn.Open(); } catch { if (conn != null ) conn.Close(); } The fix is simple - just declare conn before entering the Read More...
|
-
There was a suggestion/question on the Product Feedback site for VS2005 that suggested that the params keyword may not be that well understood. The params keyword can be applied on a method parameter that is an array. When the method is invoked, the elements Read More...
|
-
Where you once used Regsvr32 on unmanaged COM libraries, you will now use Regasm on managed .NET libraries. “ Regsvr32 is the command-line tool that registers .dll files as command components in the registry“ “Regasm.exe, the Assembly Read More...
|