Sometimes its hard to determine whether to use a property or a method in C#. There are however guidelines to help you choose the right feature to use.
ASP.NET
Right-Click Attach To Process in Visual Studio
Here’s a tip on how to tweak your Visual Studio code window context menu to include the Attach to Process debug command.
Use Any() Instead of Count() To See if an IEnumerable Has Any Objects
When determining if an IEnumerable contains any objects, avoid Count() and instead use Any().
Filter a List to Unique Objects with a HashSet
The generic HashSet in C# allows for an easy way to filter a list to distinct objects with minimal coding.
Disable ASP.NET Web Service Test Pages
Follow this simple web.config tweak to disable the form on any web service ASMX test page.
Convert a List of BaseClass to a List of DerivedClass in C#
Its possible to convert a list of objects from narrower types to wider types and vice versa using the OfType extension method. This is useful for simple filtering.