#CSharpTips
C# Tip: injecting and testing the current time with TimeProvider and FakeTimeProvider by @bellonedavide.bsky.social www.code4it.dev/csharptips/t... #aspnetcore
September 5, 2025 at 8:44 AM
🔸 I keep getting “file in use” errors in C#

Remember to close or dispose of file streams. Using using blocks helps prevent locked resources.

#FileHandling #CSharpTips #Code
March 7, 2025 at 2:42 PM
Testing with date and time is no longer a pain! Learn how to inject and test current time with TimeProvider and FakeTimeProvider. https://www.code4it.dev/csharptips/timeprovider-faketimeprovider/
C# Tip: injecting and testing the current time with TimeProvider and FakeTimeProvider
Dates used to be difficult to test. But with TimeProvider and FakeTimeProvider, everything becomes possible!
www.code4it.dev
September 12, 2025 at 1:15 PM
🐧 Just published a new article on generating realistic data in C# with Bogus! 🚀

Learn 2 ways to create fake data effortlessly for your projects.

Perfect for testing, seeding databases, and more! 💡

#CSharp #Coding #dotnet

www.code4it.dev/csharptips/b...
C# Tip: 2 ways to generate realistic data using Bogus
Bogus is a library that generates realistic values for your data. When populating fake user names, instead of Foo and Bar, you can have John and Sarah. Let’s see two ways to define and reuse a Faker d...
www.code4it.dev
December 3, 2024 at 3:59 PM
C# Tip: Handling exceptions with Task.WaitAll and Task.WhenAll

www.code4it.dev/csharptips/t...
C# Tip: Handling exceptions with Task.WaitAll and Task.WhenAll
Task.WhenAll and Task.WaitAll are common methods in C# that allow you to execute multiple Tasks. But… what happens when an exception is thrown?
www.code4it.dev
June 11, 2025 at 8:40 AM