The Curious Engineer

All blogs / C# / .NET

C# Frequently Asked Questions

learn.microsoft.com/en-us/archive/blogs/csharpfaq

The C# team posts answers to common questions and describes new language features

C# / .NETMicrosoft blogsMSDN archive

’05’10’15’20’25
Posts
124 from 1 Mar 2004 to 21 May 2015
Posting
archived, read-only
Kind
company blog
Feed
https://learn.microsoft.com/en-us/archive/blogs/csharpfaq/feed.xml

2015 9

  1. New C# T-Shirt Designs on the .NET Blog - Tell Us What You Think
  2. Roslyn ships v1.0-rc2 with "Go-Live" license
  3. New C# T-Shirt Designs on the .NET Blog - Tell Us What You Think
  4. A Journey Through Open Source: The Trials & Triumphs in Roslyn's First Year of Open Source
  5. A Journey Through Open Source: The Trials & Triumphs in Roslyn's First Year of Open Source
  6. Edit & Continue and Make Object ID Improvements in CTP 6
  7. Edit & Continue and Make Object ID Improvements in CTP 6
  8. We're moving to GitHub!
  9. We're moving to GitHub!

2014 16

  1. Better together: C# 6 and the Visual Studio 2015 Debugger
  2. Better together: C# 6 and the Visual Studio 2015 Debugger
  3. New Features in C# 6
  4. Post-Release Goodies
  5. Short Videos Demonstrating What’s New in Visual Studio 2015 Preview for C#, VB, and F#
  6. Introducing the Visual Studio 2015 Preview for C# and VB
  7. New Features in C# 6
  8. Short Videos Demonstrating What’s New in Visual Studio 2015 Preview for C#, VB, and F#
  9. Introducing the Visual Studio 2015 Preview for C# and VB
  10. .NET Compiler Platform ("Roslyn") for the Rest of Us
  11. Visual Studio "14" CTP Now Available
  12. Edit and Continue survey results
  13. TechEd: "The Future of Visual Basic and C#" Video Now Available Online!
  14. Help make Edit and Continue better!
  15. Visualizing Roslyn Syntax Trees
  16. Roslyn performance (Matt Gertz)

2013 3

  1. Updated license for September 2012 Roslyn preview available (MattGe)
  2. Throwing the Big Switch on Roslyn (Matt Gertz, VS Managed Languages Development Manager)
  3. No new C# and VB Language Features in VS 2013

2012 6

  1. Microsoft "Roslyn" September 2012 CTP now available
  2. Understanding a Simple Async Program
  3. Announcing Microsoft “Roslyn” June 2012 CTP
  4. Implementing a Code Action using Roslyn
  5. Start Coding for the Kinect
  6. Roslyn CTP Introduces Interactive Code for C#

2011 10

  1. Introduction to the Roslyn Scripting API
  2. Using the Roslyn Symbol API
  3. Roslyn Syntax Visualizers
  4. Using the Roslyn Syntax API
  5. Introducing the Microsoft “Roslyn” CTP
  6. C# 2010 Soup to Nuts Series
  7. New Async Programming Videos
  8. Async CTP (SP1 Refresh)
  9. How to programmatically launch Debugger in a remote machine
  10. Visual Studio is Hiring

2010 15

  1. Microsoft Help Viewer 1.1 - Updates Planned for Visual Studio 2010 SP1
  2. What’s Next in C#? Get Ready for Async!
  3. Converting a VBA Macro to C# 4.0
  4. Blocking Collection and the Producer-Consumer Problem
  5. C# 4.0 PowerPoint Presentations
  6. Parallel Programming: Task Cancellation
  7. Parallel Programming: Task Schedulers and Synchronization Context
  8. Parallel Programming in .NET Framework 4: Getting Started
  9. New IDE Features in Visual Studio 2010 for C# Developers
  10. Get Ready For C# 4.0!
  11. Crystal Reports for Visual Studio 2010
  12. How can I get objects and property values from expression trees?
  13. Covariance and Contravariance FAQ
  14. What is the difference between “dynamic” and “object” keywords?
  15. Getting Information About Objects, Types, and Members with Expression Trees

2009 6

  1. Debugging Expression Trees in Visual Studio 2010
  2. Dynamic in C# 4.0: Creating Wrappers with DynamicObject
  3. Dynamic in C# 4.0: Introducing the ExpandoObject
  4. Generating Dynamic Methods with Expression Trees in Visual Studio 2010
  5. How to use LINQ methods to compare objects of custom types
  6. Does the “LINQ to Objects” provider have built-in performance optimization?

2006 5

  1. How do I send out simple debug messages to help with my debugging?
  2. How do I calculate a MD5 hash from a string?
  3. How do I play default Windows sounds?
  4. How can I easily log a message to a file for debugging purposes?
  5. How can I speed up hashtable lookups with struct object as keys?

2005 1

  1. Where can I find design and coding guidelines for .NET?

2004 53

  1. What does the /target: command line option do in the C# compiler?
  2. What is the difference between const and static readonly?
  3. How do I create a constant that is an array?
  4. How do I get and set Environment variables?
  5. Is it possible to output the command-line used to build a project in Visual Studio?
  6. Preprocess Win32 Messages through Windows Forms
  7. Be Mindful of the References / 'using' / Manifest Relationship
  8. Leverage the C# Preprocessor
  9. Avoiding Type Name-Clashes using 'using'
  10. Build 'Consistent' .NET assemblies with FxCop
  11. Simplified Interface Implementation a la VS .NET 2003
  12. Simplified Event Handling a la VS .NET 2003
  13. Integrate ildasm.exe into VS .NET 2002
  14. Add Custom .NET Assemblies to the Add Reference Dialog
  15. Leverage C# Response Files at the Command Line
  16. Be Aware of wincv.exe
  17. Utilize the Server Explorer
  18. Obtain Type Information on the Fly using typeof
  19. Interacting with overloaded operators from overloaded operator challenged languages
  20. How to keep a local variable in scope across a try and catch block?
  21. Does C# support variable arguments (vararg's) on methods?
  22. What is the equivalent to regsvr32 in .NET?
  23. Are Generics in .NET like Templates in C++?
  24. Why does my switch statement works differently?
  25. Why does C#'s iterators feature spit out a class definition instead of a struct definition?
  26. How can I run another application or batch file from my Visual C# .NET code?
  27. How do I cast a string to an int, float, double, etc?
  28. How are return values from a delegate handled?
  29. Why don't nullable relational operators return bool? instead of bool?
  30. Why can't I use the same variable as an inner loop does?
  31. How do I write a method that accepts a variable number of parameters?
  32. Why doesn't C# support static method variables?
  33. Why must attribute properties be read/write in C#?
  34. Why do I get the error "Object reference not set to an instance of an object"?
  35. Why did I receive the error: "The type or namespace '<namespace name>' does not exist in the class or namespace '<parent namespace>' (are you missing an assembly reference?)"
  36. How can I subscribe to events exposed by a remoted object?
  37. Why does my Windows Form project not use visual styles in XP even when I call Application.EnableVisualStyles?
  38. Why aren't reference types polymorphic?
  39. Should I assign null to my local variables?
  40. Why do I need a null test before I invoke a delegate?
  41. Why doesn't C# warn about unused methods?
  42. How can I update my user interface from a thread that did not create it?
  43. Why can't I have static and instance methods with the same name?
  44. Where can I find sample C# code for simple threading?
  45. How do C# generics compare to C++ templates?
  46. Where is the C# specification?
  47. Why don't relational operators return bool as a type?
  48. Why doesn't C# support #define macros?
  49. Why don't namespace using directives import nested namespaces?
  50. Why doesn't C# have a power operator?
  51. Why doesn't C# support multiple inheritance?
  52. Does C# have default parameters?
  53. Ask a FAQ Question