C# Digest - A neat trick to debug exceptions in C#
#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
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
Healthy life, Meta's AI and legibility
Saturday, January 11, 2025
Neologism #25, 11.01.2024 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
Daily Coding Problem: Problem #1665 [Medium]
Saturday, January 11, 2025
Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by LinkedIn. A wall consists of several rows of bricks of various integer lengths and
📊 Every Smartphone I've Ever Owned, Ranked — This Tiny Smart Remote Is the Most Exciting Thing at CES
Saturday, January 11, 2025
Also: 5 Android Notification Features to Make Your Day Easier, and More! How-To Geek Logo January 11, 2025 Did You Know On March 12, 1951, a curious thing happened. In the United States and the United
Ranked | The Top Grossing Movies Worldwide in 2024 🎬
Saturday, January 11, 2025
Established IP dominated the 2024 box office, with top films mostly being sequels, spin-offs, or franchise continuations. View Online | Subscribe | Download Our App FEATURED STORY Ranked: Top Grossing
📖 Your Step-by-Step Guide to Securing AI in the Enterprise
Saturday, January 11, 2025
January 11, 2025 | Read Online Subscribe | Advertise Good Morning. Welcome to this special edition of The Deep View, brought to you in collaboration with Tines. When it comes to adopting AI securely,
🐍 New Python tutorials on Real Python
Saturday, January 11, 2025
Hey there, There's always something going on over at Real Python as far as Python tutorials go. Here's what you may have missed this past week: Iterators and Iterables in Python: Run Efficient
Life Update: Me. In Shorts. In Antarctica [Pics Inside 🧊]
Saturday, January 11, 2025
And yes, I jumped in. It taught me a lot 😅 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
Google Researcher Uncovers Zero-Click Exploit Targeting Android Devices
Saturday, January 11, 2025
THN Daily Updates Newsletter cover The Kubernetes Book: Navigate the world of Kubernetes with expertise , Second Edition ($39.99 Value) FREE for a Limited Time Containers transformed how we package and
📧 Working with LLMs in .NET using Microsoft.Extensions.AI
Saturday, January 11, 2025
Working with LLMs in .NET using Microsoft․Extensions․AI Read on: my website / Read time: 6 minutes The .NET Weekly is brought to you by: Transform your database performance with RavenDB:
iOS Dev Weekly – Issue 694
Friday, January 10, 2025
Hopefully you won't see that much difference with receiving this issue, but it's ALL CHANGED behind the scenes! 😱