Sign In
C# Frequently Asked Questions
The C# team posts answers to common questions and describes new language features
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
.NET Framework
.NET Framework 4
async
asynchronous programming
await
C#
C# 3.0
C# 4.0
C# compiler
C#/VB.NET Equivalents
DLR
dynamic language runtime
expression trees
IDE
parallel-processing
parallel-programming
reflection
roslyn
Task Parallel Library
Tips
TPL
Visual Studio
Visual Studio 2010
Visual Studio Async CTP
WPF
Archive
Archives
April 2012
(1)
February 2012
(3)
January 2012
(2)
December 2011
(1)
November 2011
(3)
October 2011
(1)
August 2011
(2)
April 2011
(1)
March 2011
(1)
February 2011
(1)
November 2010
(1)
October 2010
(1)
September 2010
(1)
August 2010
(1)
July 2010
(2)
June 2010
(2)
May 2010
(1)
April 2010
(2)
March 2010
(1)
February 2010
(1)
January 2010
(2)
November 2009
(1)
October 2009
(2)
September 2009
(1)
March 2009
(1)
January 2009
(1)
October 2006
(2)
March 2006
(3)
February 2005
(1)
December 2004
(4)
November 2004
(1)
October 2004
(15)
August 2004
(3)
July 2004
(3)
June 2004
(1)
May 2004
(8)
April 2004
(4)
March 2004
(36)
August, 2004
MSDN Blogs
>
C# Frequently Asked Questions
>
August, 2004
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
C# Frequently Asked Questions
How to keep a local variable in scope across a try and catch block?
Posted
over 8 years ago
by
CSharpFAQ
18
Comments
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...
C# Frequently Asked Questions
Does C# support variable arguments (vararg's) on methods?
Posted
over 8 years ago
by
CSharpFAQ
4
Comments
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...
C# Frequently Asked Questions
What is the equivalent to regsvr32 in .NET?
Posted
over 8 years ago
by
CSharpFAQ
11
Comments
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...
Page 1 of 1 (3 items)