---
title: "C# - Muhammad Rehan Saeed"
description: "Blog posts authored by Muhammad Rehan Saeed about C#."
canonical_url: "https://rehansaeed.com/tag/c/"
meta:
  author: "Muhammad Rehan Saeed"
  "og:description": "Blog posts authored by Muhammad Rehan Saeed about C#."
  "og:image": "https://rehansaeed.com/_og/s/o_74e15e303fac1165.png"
  "og:image:alt": "# C# - Muhammad Rehan Saeed"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "C#"
  "twitter:image": "https://rehansaeed.com/_og/s/o_74e15e303fac1165.png"
  "twitter:image:alt": "# C# - Muhammad Rehan Saeed"
---

> Index of every page on this site: [llms.txt](https://rehansaeed.com/llms.txt)

# [# C#](https://rehansaeed.com/tag/c/)

## [.NET Boxed Visual Studio Integration](https://rehansaeed.com/dotnet-boxed-visual-studio-integration/)

You can now create .NET Boxed projects directly from Visual Studio. Here's a short post showing you how.

Posted 27 May 2021 - **1 min read**

## [ASP.NET Core Hidden Gem - QueryHelpers](https://rehansaeed.com/asp-net-core-hidden-gem-queryhelpers/)

How to build a URL containing dynamic query arguments using the ASP.NET Core QueryHelpers.AddQueryString method. A hidden gem in ASP.NET Core.

Posted 14 July 2018 - **1 min read**

## [ASP.NET Core Caching in Practice](https://rehansaeed.com/asp-net-core-caching-in-practice/)

How to use and implement Cache-Control, Cache-Control Immutable, E-Tag, Last-Modified and If-Modified-Since Caching HTTP headers in ASP.NET Core.

Posted 20 October 2017 - **5 min read**

## [A Very Generic .editorconfig File (Updated)](https://rehansaeed.com/generic-editorconfig-file/)

An .editorconfig file helps define and maintain consistent coding styles between different editors and IDEs for files with different file extensions.

Posted 1 October 2017 and updated 1 July 2018 - **2 min read**

## [Structured Data using Schema.NET](https://rehansaeed.com/structured-data-using-schema-net/)

Schema.NET is Schema.org objects turned into strongly typed C# POCO classes for use in .NET.

Posted 2 July 2017 - **2 min read**

## [ASP.NET Core Lazy Command Pattern](https://rehansaeed.com/asp-net-core-lazy-command-pattern/)

Move your ASP.NET Core MVC action method logic into lazily loaded commands using the command pattern, to reduce Controller complexity.

Posted 8 April 2017 - **4 min read**

## [dotnet new Feature Selection](https://rehansaeed.com/dotnet-new-feature-selection/)

How to add feature selection to your dotnet new template using symbols (bool, string, choice, computed) and pre-processor directives.

Posted 26 March 2017 - **9 min read**

## [Making Application Insights Fast & Secure](https://rehansaeed.com/making-application-insights-fast-and-secure/)

Implementing Application Insights into your ASP.NET Core application with performance and security as a top priority in this advanced scenario.

Posted 11 December 2016 - **4 min read**

## [Subresource Integrity TagHelper Using ASP.NET Core - Part 2](https://rehansaeed.com/subresource-integrity-taghelper-using-asp-net-core-part-2/)

Use an ASP.NET Core TagHelper to implement Subresource Integrity (SRI) to ensure that external resources have not been tampered with. With is part 2.

Posted 12 March 2016 - **4 min read**

## [Subresource Integrity TagHelper Using ASP.NET Core - Part 1](https://rehansaeed.com/subresource-integrity-taghelper-using-asp-net-core/)

Use an ASP.NET Core TagHelper to implement Subresource Integrity (SRI) to ensure that external resources have not been tampered with.

Posted 6 March 2016 - **3 min read**

## [Colorful.Console](https://rehansaeed.com/colorful-console/)

Colorful.Console is a C# library that wraps around the System.Console class, making your console apps more colourful. Write ASCII art using Figlet fonts.

Posted 14 February 2016 - **2 min read**

## [Logging with Serilog.Exceptions](https://rehansaeed.com/logging-with-serilog-exceptions/)

Log exception details and custom properties that are not output in Exception.ToString() using Serilog.Exceptions for .NET.

Posted 31 January 2016 - **3 min read**

## [Whats New in ASP.NET Core Boilerplate](https://rehansaeed.com/whats-new-in-asp-net-5-mvc-6-boilerplate/)

With the release of ASP.NET Core Boilerplate, this post discusses what's new and what is currently missing due to ASP.NET Core still being in beta.

Posted 23 August 2015 - **2 min read**

## [Dynamically Generating Robots.txt Using ASP.NET MVC](https://rehansaeed.com/dynamically-generating-robots-txt-using-asp-net-mvc/)

How to dynamically generate a robots.txt file using a simple ASP.NET MVC action method and only a few lines of code.

Posted 31 July 2015 - **4 min read**

## [Canonical URL's for ASP.NET MVC](https://rehansaeed.com/canonical-urls-for-asp-net-mvc/)

Use canonical URL's in ASP.NET MVC for better Search Engine Optimization (SEO) using ASP.NET Core Boilerplate and the RedirectToCanonicalUrlAttribute.

Posted 14 July 2015 - **11 min read**

## [Building RSS/Atom Feeds for ASP.NET MVC](https://rehansaeed.com/building-rssatom-feeds-for-asp-net-mvc/)

How to build a fully featured RSS/Atom feed for ASP.NET MVC, including Google's PubSubHubbub and the 'Subscribe to this feed' button.

Posted 26 June 2015 - **19 min read**

## [C# 6.0 - Saving Developers From Themselves](https://rehansaeed.com/c-6-0-saving-developers-from-themselves/)

C# 6.0 helps reduce human error and save developers from themselves using the nameof operator, string interpolation and the null-conditional operator.

Posted 10 May 2015 - **5 min read**

## [Content Security Policy (CSP) for ASP.NET MVC](https://rehansaeed.com/content-security-policy-for-asp-net-mvc/)

Content Security Policy (CSP) is a HTTP header which white-lists content the browser is allowed to load. This post discusses its application in ASP.NET MVC.

Posted 17 March 2015 - **22 min read**

## [NWebSec ASP.NET MVC Security Through HTTP Headers](https://rehansaeed.com/nwebsec-asp-net-mvc-security-through-http-headers/)

The NWebSec NuGet packages help secure your ASP.NET MVC site using HTTP headers. The ASP.NET Core Boilerplate project template configures them our of the box.

Posted 5 February 2015 - **6 min read**

## [Reactive Extensions (Rx) - Part 7 - Sample Events](https://rehansaeed.com/reactive-extensions-part7-sample-events/)

Shows how to use the Reactive Extensions (Rx) Sample method to reduce the number of subscribed events by taking a sample from them over a given time period.

Posted 24 December 2014 - **2 min read**

## [Securing the ASP.NET MVC Web.config](https://rehansaeed.com/securing-the-aspnet-mvc-web-config/)

The web.config file is insecure in the default ASP.NET MVC project template. This post talks you through securing the ASP.NET MVC Web.config file.

Posted 17 December 2014 - **11 min read**

## [Custom Visual Studio Project Templates](https://rehansaeed.com/custom-visual-studio-project-templates/)

A guide to creating custom Visual Studio project templates in .zip and VSIX form and submitting them to the Visual Studio Gallery, so it can be downloaded.

Posted 10 December 2014 - **7 min read**

## [Internet Favicon Madness (Updated)](https://rehansaeed.com/internet-favicon-madness/)

Add favicon's to your website to support iOS, Android, Windows 7, Windows 8, Windows Phone and more. Find out where icons are used on each platform and how.

Posted 24 November 2014 - **17 min read**

## [ASP.NET Core Boilerplate](https://rehansaeed.com/asp-net-mvc-boilerplate/)

ASP.NET Core Boilerplate is a professional ASP.NET MVC template for building secure, fast, robust and adaptable web applications or sites.

Posted 12 November 2014 - **7 min read**

## [Elysium Extra 1.1 Released](https://rehansaeed.com/elysium-extra-1-1-released/)

Elysium Extra Version 1.1 is a Windows Presentation Foundation (WPF) SDK providing Metro styles for built in WPF controls and some custom controls.

Posted 5 November 2014 - **4 min read**

## [Model-View-ViewModel (MVVM) - Part 4 - INotifyDataErrorInfo](https://rehansaeed.com/model-view-viewmodel-mvvm-part4-inotifydataerrorinfo/)

An base class implementation for the INotifyDataErrorInfo interface. Used in the Model-View-ViewModel (MVVM) pattern. Targeted for best performance.

Posted 9 September 2014 - **12 min read**

## [Naming Conventions](https://rehansaeed.com/naming-conventions/)

Code is written to be read by humans, not machines. Naming conventions and standard code styling can boost productivity, particularly if working in teams.

Posted 4 September 2014 - **3 min read**

## [Model-View-ViewModel (MVVM) - Part 3 - INotifyPropertyChanged](https://rehansaeed.com/model-view-viewmodel-mvvm-part3-inotifypropertychanged/)

An base class implementation for the INotifyPropertyChanged interface. Used in the Model-View-ViewModel (MVVM) pattern. Targeted for best performance.

Posted 18 June 2014 - **11 min read**

## [Model-View-ViewModel (MVVM) - Part 2 - IDisposable](https://rehansaeed.com/model-view-viewmodel-mvvm-part2-idisposable/)

Implementing IDisposable correctly is ridiculously hard. A Disposable base class can make it easier. Using IDisposable in Model-View-ViewModel (MVVM) really helps.

Posted 13 June 2014 - **4 min read**

## [Model-View-ViewModel (MVVM) - Part 1 - Overview](https://rehansaeed.com/model-view-viewmodel-mvvm-part1-overview/)

What really goes into using Model-View-ViewModel (MVVM) in .NET. Base classes for INotifyPropertyChanged, INotifyDataErrorInfo, IDisposable and a lot more.

Posted 14 May 2014 - **5 min read**

## [Portable Class Library (PCL) version of NotificationsExtensions NuGet package](https://rehansaeed.com/portable-class-library-version-of-notificationsextensions-nuget-package/)

NotificationsExtensions.Portable is a Portable Class Library (PCL) used to Create Windows 8.1 or Windows Phone 8.1 Tile, Toast and Badge Notification XML.

Posted 6 May 2014 - **1 min read**

## [Reactive Extensions (Rx) - Part 6 - Task ToObservable](https://rehansaeed.com/reactive-extensions-part6-task-toobservable/)

How and where to use the Reactive Extensions (Rx) ToObservable Extension method to turn a Task Parallel Library (TPL) Task into an IObservable.

Posted 25 April 2014 - **5 min read**

## [GetHashCode Made Easy](https://rehansaeed.com/gethashcode-made-easy/)

Implementing GetHashCode is hard work and little understood. Learn how to implement GetHashCode as quickly and as simply as possible.

Posted 14 April 2014 and updated 12 June 2019 - **8 min read**

## [WPF Metro Part 4 - Elysium Extra](https://rehansaeed.com/wpf-metro-part4-elysium-extra/)

Elysium Extra is an excellent Windows Presentation Foundation (WPF) SDK providing Metro styles for built in WPF controls and some custom controls.

Posted 19 March 2014 - **8 min read**

## [WPF Metro Part 3 - Elysium](https://rehansaeed.com/wpf-metro-part3-elysium/)

Elysium is an excellent Windows Presentation Foundation (WPF) SDK (On CodePlex) providing Metro styles for built in WPF controls and some custom controls.

Posted 17 March 2014 - **2 min read**

## [Reactive Extensions (Rx) - Part 4 - Replacing Timers](https://rehansaeed.com/reactive-extensions-part4-replacing-timers/)

You should definitely consider using Reactive Extensions (Rx) is as a direct replacement for .NET Timers. This post will explain how.

Posted 11 March 2014 - **3 min read**

## [WPF Metro Part 2 - MahApps Metro](https://rehansaeed.com/wpf-metro-part2-mahapps-metro/)

MahApps Metro is an excellent Windows Presentation Foundation (WPF) SDK providing Metro styles for built in WPF controls and several custom controls.

Posted 2 March 2014 - **3 min read**

## [WPF Metro Part 1 - Modern UI for WPF](https://rehansaeed.com/wpf-metro-part1-modern-ui-for-wpf/)

Modern UI for WPF is an excellent Windows Presentation Foundation (WPF) SDK providing Metro styles for built in WPF controls and several custom controls.

Posted 19 February 2014 - **3 min read**

## [Reactive Extensions (Rx) - Part 3 - Naming Conventions](https://rehansaeed.com/reactive-extensions-part3-naming-conventions/)

Reactive Extensions (Rx) Advantages of using IObservable property naming conventions and comparison between C# events.

Posted 14 February 2014 - **2 min read**

## [Reactive Extensions (Rx) - Part 2 - Wrapping C# Events](https://rehansaeed.com/reactive-extensions-part2-wrapping-events/)

Reactive Extensions IObservable wrappers for C# events and hiding the C# events entirely from subscribers using explicit interface implementations.

Posted 13 February 2014 - **3 min read**

## [Reactive Extensions (Rx) - Part 1 - Replacing C# Events](https://rehansaeed.com/reactive-extensions-part1-replacing-events/)

You should definitely consider using Reactive Extensions (Rx) is as a direct replacement for C# events. This post will explain how.

Posted 11 February 2014 - **4 min read**

## [Stop The Brace Wars, Use StyleCop](https://rehansaeed.com/stop-brace-wars-use-stylecop/)

StyleCop analyzes C# source code to enforce a set of style and consistency rules. Rehan advocates its use in this thought provoking article.

Posted 8 February 2014 - **3 min read**

## [ConfigureAwait in Task Parallel Library (TPL)](https://rehansaeed.com/configureawait-task-parallel-library/)

The importance of using ConfigureAwait when using the Task Parallel Library (TPL) to improve performance and reduce context switching.

Posted 7 February 2014 - **2 min read**

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://rehansaeed.com/#website","@type":"WebSite","description":"Software Developer at Microsoft, YouTuber, Open Source Contributor and Blogger","inLanguage":"en-GB","name":"Muhammad Rehan Saeed","url":"https://rehansaeed.com/","author":{"@id":"https://rehansaeed.com/#identity"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://rehansaeed.com/?search={search_term_string}"},"query-input":"required name=search_term_string"}],"publisher":{"@id":"https://rehansaeed.com/#publisher"}},{"@id":"https://rehansaeed.com/tag/c/#webpage","description":"Blog posts authored by Muhammad Rehan Saeed about C#.","name":"C#","url":"https://rehansaeed.com/tag/c/","@type":["WebPage","CollectionPage"],"breadcrumb":{"@id":"https://rehansaeed.com/tag/c/#breadcrumb"},"isPartOf":{"@id":"https://rehansaeed.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://rehansaeed.com/tag/c/"]}]},{"@id":"https://rehansaeed.com/#identity","@type":"Person","name":"Muhammad Rehan Saeed","url":"https://rehansaeed.com/about/","image":{"@id":"https://rehansaeed.com/#/schema/image/1"},"sameAs":["https://github.com/RehanSaeed","https://www.linkedin.com/in/muhammad-rehan-saeed","https://stackoverflow.com/users/1212017/muhammad-rehan-saeed","https://www.youtube.com/c/MuhammadRehanSaeed","https://www.twitch.tv/rehansaeeduk"]},{"@id":"https://rehansaeed.com/#publisher","@type":"Organization","logo":"https://rehansaeed.com/images/schema/Publisher-600x60.png","name":"Muhammad Rehan Saeed","url":"https://rehansaeed.com"},{"@id":"https://rehansaeed.com/tag/c/#/schema/item-list/1","@type":"ItemList","itemListElement":[{"@type":"ListItem","name":".NET Boxed Visual Studio Integration","url":"https://rehansaeed.com/dotnet-boxed-visual-studio-integration/","position":1},{"@type":"ListItem","name":"ASP.NET Core Hidden Gem - QueryHelpers","url":"https://rehansaeed.com/asp-net-core-hidden-gem-queryhelpers/","position":2},{"@type":"ListItem","name":"ASP.NET Core Caching in Practice","url":"https://rehansaeed.com/asp-net-core-caching-in-practice/","position":3},{"@type":"ListItem","name":"A Very Generic .editorconfig File (Updated)","url":"https://rehansaeed.com/generic-editorconfig-file/","position":4},{"@type":"ListItem","name":"Structured Data using Schema.NET","url":"https://rehansaeed.com/structured-data-using-schema-net/","position":5},{"@type":"ListItem","name":"ASP.NET Core Lazy Command Pattern","url":"https://rehansaeed.com/asp-net-core-lazy-command-pattern/","position":6},{"@type":"ListItem","name":"dotnet new Feature Selection","url":"https://rehansaeed.com/dotnet-new-feature-selection/","position":7},{"@type":"ListItem","name":"Making Application Insights Fast & Secure","url":"https://rehansaeed.com/making-application-insights-fast-and-secure/","position":8},{"@type":"ListItem","name":"Subresource Integrity TagHelper Using ASP.NET Core - Part 2","url":"https://rehansaeed.com/subresource-integrity-taghelper-using-asp-net-core-part-2/","position":9},{"@type":"ListItem","name":"Subresource Integrity TagHelper Using ASP.NET Core - Part 1","url":"https://rehansaeed.com/subresource-integrity-taghelper-using-asp-net-core/","position":10},{"@type":"ListItem","name":"Colorful.Console","url":"https://rehansaeed.com/colorful-console/","position":11},{"@type":"ListItem","name":"Logging with Serilog.Exceptions","url":"https://rehansaeed.com/logging-with-serilog-exceptions/","position":12},{"@type":"ListItem","name":"Whats New in ASP.NET Core Boilerplate","url":"https://rehansaeed.com/whats-new-in-asp-net-5-mvc-6-boilerplate/","position":13},{"@type":"ListItem","name":"Dynamically Generating Robots.txt Using ASP.NET MVC","url":"https://rehansaeed.com/dynamically-generating-robots-txt-using-asp-net-mvc/","position":14},{"@type":"ListItem","name":"Canonical URL's for ASP.NET MVC","url":"https://rehansaeed.com/canonical-urls-for-asp-net-mvc/","position":15},{"@type":"ListItem","name":"Building RSS/Atom Feeds for ASP.NET MVC","url":"https://rehansaeed.com/building-rssatom-feeds-for-asp-net-mvc/","position":16},{"@type":"ListItem","name":"C# 6.0 - Saving Developers From Themselves","url":"https://rehansaeed.com/c-6-0-saving-developers-from-themselves/","position":17},{"@type":"ListItem","name":"Content Security Policy (CSP) for ASP.NET MVC","url":"https://rehansaeed.com/content-security-policy-for-asp-net-mvc/","position":18},{"@type":"ListItem","name":"NWebSec ASP.NET MVC Security Through HTTP Headers","url":"https://rehansaeed.com/nwebsec-asp-net-mvc-security-through-http-headers/","position":19},{"@type":"ListItem","name":"Reactive Extensions (Rx) - Part 7 - Sample Events","url":"https://rehansaeed.com/reactive-extensions-part7-sample-events/","position":20},{"@type":"ListItem","name":"Securing the ASP.NET MVC Web.config","url":"https://rehansaeed.com/securing-the-aspnet-mvc-web-config/","position":21},{"@type":"ListItem","name":"Custom Visual Studio Project Templates","url":"https://rehansaeed.com/custom-visual-studio-project-templates/","position":22},{"@type":"ListItem","name":"Internet Favicon Madness (Updated)","url":"https://rehansaeed.com/internet-favicon-madness/","position":23},{"@type":"ListItem","name":"ASP.NET Core Boilerplate","url":"https://rehansaeed.com/asp-net-mvc-boilerplate/","position":24},{"@type":"ListItem","name":"Elysium Extra 1.1 Released","url":"https://rehansaeed.com/elysium-extra-1-1-released/","position":25},{"@type":"ListItem","name":"Model-View-ViewModel (MVVM) - Part 4 - INotifyDataErrorInfo","url":"https://rehansaeed.com/model-view-viewmodel-mvvm-part4-inotifydataerrorinfo/","position":26},{"@type":"ListItem","name":"Naming Conventions","url":"https://rehansaeed.com/naming-conventions/","position":27},{"@type":"ListItem","name":"Model-View-ViewModel (MVVM) - Part 3 - INotifyPropertyChanged","url":"https://rehansaeed.com/model-view-viewmodel-mvvm-part3-inotifypropertychanged/","position":28},{"@type":"ListItem","name":"Model-View-ViewModel (MVVM) - Part 2 - IDisposable","url":"https://rehansaeed.com/model-view-viewmodel-mvvm-part2-idisposable/","position":29},{"@type":"ListItem","name":"Model-View-ViewModel (MVVM) - Part 1 - Overview","url":"https://rehansaeed.com/model-view-viewmodel-mvvm-part1-overview/","position":30},{"@type":"ListItem","name":"Portable Class Library (PCL) version of NotificationsExtensions NuGet package","url":"https://rehansaeed.com/portable-class-library-version-of-notificationsextensions-nuget-package/","position":31},{"@type":"ListItem","name":"Reactive Extensions (Rx) - Part 6 - Task ToObservable","url":"https://rehansaeed.com/reactive-extensions-part6-task-toobservable/","position":32},{"@type":"ListItem","name":"GetHashCode Made Easy","url":"https://rehansaeed.com/gethashcode-made-easy/","position":33},{"@type":"ListItem","name":"WPF Metro Part 4 - Elysium Extra","url":"https://rehansaeed.com/wpf-metro-part4-elysium-extra/","position":34},{"@type":"ListItem","name":"WPF Metro Part 3 - Elysium","url":"https://rehansaeed.com/wpf-metro-part3-elysium/","position":35},{"@type":"ListItem","name":"Reactive Extensions (Rx) - Part 4 - Replacing Timers","url":"https://rehansaeed.com/reactive-extensions-part4-replacing-timers/","position":36},{"@type":"ListItem","name":"WPF Metro Part 2 - MahApps Metro","url":"https://rehansaeed.com/wpf-metro-part2-mahapps-metro/","position":37},{"@type":"ListItem","name":"WPF Metro Part 1 - Modern UI for WPF","url":"https://rehansaeed.com/wpf-metro-part1-modern-ui-for-wpf/","position":38},{"@type":"ListItem","name":"Reactive Extensions (Rx) - Part 3 - Naming Conventions","url":"https://rehansaeed.com/reactive-extensions-part3-naming-conventions/","position":39},{"@type":"ListItem","name":"Reactive Extensions (Rx) - Part 2 - Wrapping C# Events","url":"https://rehansaeed.com/reactive-extensions-part2-wrapping-events/","position":40},{"@type":"ListItem","name":"Reactive Extensions (Rx) - Part 1 - Replacing C# Events","url":"https://rehansaeed.com/reactive-extensions-part1-replacing-events/","position":41},{"@type":"ListItem","name":"Stop The Brace Wars, Use StyleCop","url":"https://rehansaeed.com/stop-brace-wars-use-stylecop/","position":42},{"@type":"ListItem","name":"ConfigureAwait in Task Parallel Library (TPL)","url":"https://rehansaeed.com/configureawait-task-parallel-library/","position":43}]},{"@id":"https://rehansaeed.com/tag/c/#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Blog","item":"https://rehansaeed.com/","position":1},{"@type":"ListItem","name":"C#","item":"https://rehansaeed.com/tag/c/","position":2}]},{"@id":"https://rehansaeed.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://rehansaeed.com/images/author/Muhammad-Rehan-Saeed/Logo-512x512.png","inLanguage":"en-GB","url":"https://rehansaeed.com/images/author/Muhammad-Rehan-Saeed/Logo-512x512.png"}]}
```

## Sitemap

See the full [sitemap](https://rehansaeed.com/sitemap.md) for all pages.
