C# Digest - A neat trick to debug exceptions in C#

And more news, tutorials and articles about C# and .NET in this week's issue.

#378 — August 30, 2021 View in browser

C# Digest

Spread the word, build the community, share the knowledge – invite your friends.

sponsor

Why do C# developers use static code analyzer?

You'll find the answer to this question on the PVS-Studio blog. Use the #digest promo code to get a month free trial of the analyzer.

this week's favorite

A neat trick to debug exceptions in C#

Assume we have a method called UnsafeMethod(), which throws an exception upon calling it. What we want to do is to debug this method and find out where this exception comes from. The naïve approach is to simply surround it with a try-catch, and set a debug point in the catch-block.

Testing websites with Selenium

Selenium facilitates running automated E2E tests as if you were a user accessing the website using the any browser with a supported WebDriver. This enables you to test things not normally available to unit and integration tests such as cross browser support. And using a well thought out strategy, can make it easy to maintain tests even for a complex difficult to test legacy code base. I'll be writing my examples in C# and some of it will be C# specific, but the concepts can apply to multiple languages.

.NET locking in an Async Method

This snippet is for initializing a SignalR connection, I found this pattern to work really well for my use case. Since I want only one connection to my external service started the lock makes sure multiple calls to GetConnection will return a single initialized instances also making it lazily started. The pattern is simple enough, but could be enhanced with a key/value cache on the URL, so multiple connections can be cached.

New .NET 6 APIs driven by the developer community

.NET 6 is on the way, and I wanted to share some of my favorite new APIs in .NET and ASP.NET Core that you are going to love. Why are you going to love them? Well because they were directly driven by our fantastic .NET developer community! Let’s get started!

Build a machine learning data analysis application

Neural networks are very powerful to perform predictive analysis and solve analytical tasks. They are widely used for data classification to detect patterns in the input data and make predictions. The business cases are varied from customer data classification and protection, text classification, consumer behavior, and many others.

newsletters


© 2021 Bonobo Press
Would you like to advertise or post a job with us? Check out our latest media kit.
If you no longer wish to receive these emails, click to unsubscribe.

Older messages

Performance improvements in .NET 6

Sunday, August 22, 2021

And more news, tutorials and articles about C# and .NET in this week's issue. #377 — August 23, 2021 View in browser C# Digest Spread the word, build the community, share the knowledge – invite

Optimization of .NET applications: A big result of small edits

Sunday, August 15, 2021

And more news, tutorials and articles about C# and .NET in this week's issue. #376 — August 16, 2021 View in browser C# Digest Spread the word, build the community, share the knowledge – invite

New runtime features coming in .NET 6

Sunday, August 8, 2021

And more news, tutorials and articles about C# and .NET in this week's issue. #375 — August 09, 2021 View in browser C# Digest Spread the word, build the community, share the knowledge – invite

Try the new System.Text.Json source generator

Sunday, August 1, 2021

And more news, tutorials and articles about C# and .NET in this week's issue. #374 — August 02, 2021 View in browser C# Digest Spread the word, build the community, share the knowledge – invite

Anatomy of a .NET app

Sunday, July 25, 2021

And more news, tutorials and articles about C# and .NET in this week's issue. #373 — July 26, 2021 View in browser C# Digest Spread the word, build the community, share the knowledge – invite your

You Might Also Like

Spyglass Dispatch: The Xitter Bail Out • OpenAI Tender • Grokking Grok • Smartphone Sales • Fischer Random Chess • Scott Bessent for Treasury

Wednesday, November 27, 2024

The Xitter Bail Out • OpenAI Tender • Grokking Grok • Smartphone Sales • Fischer Random Chess • Scott Bessent for Treasury The Spyglass Dispatch is a free newsletter sent out daily on weekdays. Feel

The Long Road Home: A Story of Loss, Learning, and Renaissance - PART 4

Wednesday, November 27, 2024

Top Tech Content sent at Noon! How the world collects web data Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, November 27, 2024? The HackerNoon

Top Tech Deals 🏷️ PS5 Slim, 4K TVs, 10th Gen iPad, and More!

Wednesday, November 27, 2024

The Black Friday madness is here! How-To Geek Logo November 27, 2024 Top Tech Deals: PS5 Slim, 4K TVs, 10th Gen iPad, and More! The Black Friday madness is here! Black Friday sales are here, and we

The 165+ best Black Friday deals

Wednesday, November 27, 2024

Windows Super God Mode; Bluesky starter packs; Tech gifts under $100 -- ZDNET ZDNET Tech Today - US November 27, 2024 Black Friday 2024 live blog Best Black Friday deals 2024: 165+ sales live now

⚙️ Neuralink's new trial

Wednesday, November 27, 2024

Plus: Zoom is becoming an AI-first company ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Matrix Botnet Exploits IoT Devices in Widespread DDoS Botnet Campaign

Wednesday, November 27, 2024

THN Daily Updates Newsletter cover The AI Value Playbook ($35.99) FREE for a Limited Time Business leaders are challenged by the speed of AI innovation and how to navigate disruption and uncertainty.

The Sequence Chat: Why are Foundation Models so Hard to Explain and What are we Doing About it?

Wednesday, November 27, 2024

Addressing some of the interpretability challenges of foundation models and the emerging fields of mechanistic interpretability and behavioral probing. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Overcoming Perfectionism: How to Break Free from the Enemy of Progress

Wednesday, November 27, 2024

Discover how perfectionism hinders progress and learn practical strategies to overcome the fear of imperfection, boost productivity, and achieve your goals without getting stuck in the pursuit of

🖤 Laravel Black Friday Deals!

Wednesday, November 27, 2024

The biggest deals of the year Laravel Black Friday Deals View in browser Laravel News Editor Note: We are sending this outside the regular Sunday newsletter schedule because some of these specials end

BetterDev #271 - Memory: The Forgotten History and Why did Windows 95 setup use three operating systems?

Wednesday, November 27, 2024

Better Dev #271 Nov 26, 2024 Hi all, Welcome to thanksgiving issue of BetterDev. Hope everyone had a safe and warm thanksgiving. It's getting so cold these days. If you are in warzone such as