Latest Visual Studio 2022 with Copilot should work with below config to preprompt/improve/customizee the Copilot experience.
Source: Adding repository custom instructions for GitHub Copilot – GitHub Docs
My bookmarks and blogposts regarding Software Development in .NET, C#, Angular, JavaScript, CSS, Html
Latest Visual Studio 2022 with Copilot should work with below config to preprompt/improve/customizee the Copilot experience.
Source: Adding repository custom instructions for GitHub Copilot – GitHub Docs
Ctrl+Q, search for feature “exception settings” -> enable setting below

dnSpy is a debugger and .NET assembly editor. You can use it to edit and debug assemblies even if you don’t have any source code available. Main features: Debug .NET and Unity assemblies Edit .NET and Unity assemblies Light and dark themes
Debugger
- Debug .NET Framework, .NET and Unity game assemblies, no source code required
- Set breakpoints and step into any assembly
- Locals, watch, autos windows
- Variables windows support saving variables (eg. decrypted byte arrays) to disk or view them in the hex editor (memory window)
- Object IDs
- Multiple processes can be debugged at the same time
- Break on module load
- Tracepoints and conditional breakpoints
- Export/import breakpoints and tracepoints
- Call stack, threads, modules, processes windows
- Break on thrown exceptions (1st chance)
- Variables windows support evaluating C# / Visual Basic expressions
- Dynamic modules can be debugged (but not dynamic methods due to CLR limitations)
- Output window logs various debugging events, and it shows timestamps by default 🙂
- Assemblies that decrypt themselves at runtime can be debugged, dnSpy will use the in-memory image. You can also force dnSpy to always use in-memory images instead of disk files.
- Public API, you can write an extension or use the C# Interactive window to control the debugger
In this article, you’re going to dive into the universe of Apache JMeter, one of the most used agnostic load test tools in the software development community by testing it against a REST application created in ASP.NET.
ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlying OpenXML API.
Source: ClosedXML
License: MIT / Open source project
Doc: https://closedxml.readthedocs.io/en/latest/index.html
Wiki: https://github.com/closedxml/closedxml/wiki
ClosedXML is a wrapper of the offical .NET Open XML SDK:
https://github.com/dotnet/Open-XML-SDK
In .NET 6.0, we are shipping a new C# source generator to help improve the performance of applications that use System.Text.Json. In this post, I’ll go over why we built it, how it works, and what benefits you can experience in your application.
Source: Try the new System.Text.Json source generator – .NET Blog
How to handle cancellation of x number of running background tasks.
Source: Cancellation in Managed Threads | Microsoft Docs
Code examples: https://docs.microsoft.com/en-us/dotnet/standard/threading/cancellation-in-managed-threads#code-example
SharpLab is a .NET code playground that shows intermediate steps and results of code compilation. Some language features are thin wrappers on top of other features — e.g.Â
using()Â becomesÂtry/finally. SharpLab allows you to see the code as compiler sees it, and get a better understanding of .NET languages.Recent versions include experimental support for running code, with some limitations.
Online tool: SharpLab
Sometimes you need to implement some sort of retry logic if an error occurs in a c# program.
Existing libraries for retry and fault handling:
Polly
http://www.thepollyproject.org/
CircuitBreaker.Net
https://github.com/alexandrnikitin/CircuitBreaker.Net
Read more about the related Circuit Breaker pattern:
CircuitBreaker
http://martinfowler.com/bliki/CircuitBreaker.html
Circuit Breaker Pattern
https://msdn.microsoft.com/en-us/library/dn589784.aspx
Error handling and policies in general:
https://en.wikipedia.org/wiki/Exception_handling#Restarts_separate_mechanism_from_policy
https://docs.microsoft.com/en-us/dotnet/standard/exceptions/
https://stackify.com/csharp-exception-handling-best-practices/
In general these interfaces and methods are good to implement when working with comparing objects of the same type in C#:
Interfaces:
System.IEquatable<T> – strongly typed implementation
IComparable<T> – strongly typed implementation
Override methods:
An override of Object.Equals(Object).
An override of Object.GetHashCode().
An override of Object.ToString() is usually a good idea.
Operator overloads for operator == and operator !=.
General rule of GetHashCode():
If two objects is equal then their hashvalues should be the same.
E.g.:
If Equals == true then
x.GetHashCode() == y.GetHashCode()
GetHashCode() is frequently used by collections like Dictionary<Key, Value> and HashSet<T>
Links:
Guidelines for Overloading Equals() and Operator == (C# Programming Guide)
https://msdn.microsoft.com/en-us/library/ms173147.aspx