Закреплённый твит
quicktricks.dev
1.9K posts

quicktricks.dev
@quicktricks_dev
• Weekly coding tricks (each Tuesday) • Daily Software Engineer thoughts & quick tips • Developing an app to create your own code snippets!
Check here 👉 Присоединился Temmuz 2024
142 Подписки720 Подписчики

Master C#'s TimeProvider for ultimate time control!
Hardcoding DateTime.Now or DateTimeOffset.UtcNow makes your code impossible to test reliably.
.NET 8 introduced TimeProvider — an injectable abstraction for time that lets you freeze, advance, or mock time in tests without any hacks.

English

C# 11's Raw String Literals simplify multi-line strings embedded in your code.
No more escaping quotes or special characters. Easy interpolation even with curly braces that you want to escape.
Visual Studio and the C# Dev Kit provide some validation and syntax highlighting when raw string literals contain JSON data or regular expressions. You can help this mechanism using a dedicated comment above the literal.

English

✨ C# 12 introduced Collection Expressions
It's a cleaner, more expressive syntax for initializing arrays, lists, spans, and even ImmutableArrays using simple square brackets `[ ]`.
The spread operator `..` lets you merge existing collections inline.
No more chaining `.Concat()`, `.Append()`, and `.ToArray()` just to combine two arrays.

English

🔥 C#: Add new interface members without breaking existing implementations!
With default interface implementations (C# 8+), you can add a method directly to an interface with a default body — classes that already implement the interface don't need to change a thing.
Perfect for evolving library APIs without forcing every consumer to update.
💬 Do you use default interface implementations in your projects, or do you prefer extension methods (or blocks) / abstract base classes for this?

English

@Shefali__J That's all you have influence on. The rest is out of control.
English

@trikcode And this phase is where most of the projects dies.
English

CSS Roadmap in 2026
Grab the Ebook for deeper CSS mastery and real-world projects:
codewithdhanian.gumroad.com/l/zpdpf

English

@_devJNS At least it was polite delete, not an angry one 😅
English













