#csharptips نتائج البحث
Elevate your C# knowledge one tip at a time! 🌟 #CSharpTips #Tuples #Deconstruction #CodingMagic #jetbrainsrider #rider
Looking for an optimized way to get a distinct list of strings in C#? Look no further than using a Hashset! This method provides constant time-performance for adding elements and ensures uniqueness. #CSharpTips #Optimization
By using extension methods, you can enhance built-in or custom classes, making your code more readable and modular. **#CSharpTips #ExtensionMethods #CodeEnhancements #SoftwareEngineering #CodeReadability**
در ASP.NET Core (نسخه .NET 9) ویژگی MapStaticAssets اضافه شده که تحویل فایلهای ایستا (CSS/JS/تصاویر) را برای SPA یا Blazor بهینهتر میکند: با کشبندی خودکار، فشردهسازی و fingerprinting. #CSharpTips
🔸 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
در .NET 7، از RequiredMemberAttribute برای record و struct استفاده کن؛ کامپایلر مجبور میکنه همه propertyهای ضروری مقداردهی بشن از بروز خطاهای runtime و objectهای ناقص جلوگیری میکنه #CSharpTips
Explora estas pautas esenciales para escribir código más eficiente y robusto en C#. 💡💻 Nuestros consejos de C# te guiarán hacia la excelencia. #CSharpTips #DesarrolloDeSoftware
استفاده از ArrayPool<T> برای کاهش تخصیص حافظه با ArrayPool.Shared.Rent() آرایهها رو از pool میگیری و دوباره برمیگردونی. در اپلیکیشنهای high throughput (مانند APIهای پرترافیک) باعث کاهش GC pressure و افزایش performance میشه. #CSharpTips
Switch expressions simplify logic in C#. #DotNet #CSharpTips #Developer
Method 2: Collections Export a List<t> or object collection using IWorksheet.ImportData(). It supports nested objects and grouping options, which are useful for complex data models. ➡️ Next, let’s explore database exports 👇 #CSharpTips #Excel #List #ObjectCollections (4/8)
با استفاده از Lazy<T> شیء رو فقط وقتی میسازه که واقعاً بهش نیاز هست، نه در زمان initialization. باعث کاهش مصرف حافظه و افزایش startup speed میشه. #CSharpTips
در دات نت، وقتی از FrozenDictionary ها میخوایم استفاده کنیم، پشت صحنه در Runtime بر اساس نوع دیتاستی که داره استفاده میشه، یه پیاده سازی مجزا داره برای همین ساختش هزینه بر هست، ولی خوانش دیتا سرعت عالی داره #CSharpTips
قبلاً برای عملگرهای ریاضی باید overloadهای جدا یا switchهای بزرگ مینوشتی. الان میتونی روی genericها عملگرهای ریاضی داشته باشی بدون پیچیدگی. #CSharpTips
در دات نت 9، Params Span معرفی شده حالا میتونی از params ReadOnlySpan<T> در متدها استفاده کنی، بدون ساخت آرایه جدید. کاهش allocation، کارایی بالاتر و مخصوص سناریوهای performance-critical #CSharpTips
SemaphoreSlim بهتر از lock در async lock با async قابل استفاده نیست. SemaphoreSlim lightweight و async-friendly هست، و برای throttle کردن دسترسی به یک resource فوقالعادهست. #CSharpTips
در c# 10 به بعد میتونی using های تکراری رو یکبار در یک فایل بنویسی و از کل پروژه حذفشون کنی. بهش Global Using میگن که باعث میشه کد تمیزتر بشه. #CSharpTips
در دات نت 8، ساختار جدیدی به نام InlineArray اضافه شده میتونی یه آرایه با اندازه ثابت داخل struct تعریف کنی، بدون تخصیص heap. کارایی خیلی بالا (zero allocation) مناسب برای پردازش دادههای کوچک استفاده با attribute [InlineArray(n)] روی struct #CSharpTips
در .NET 9، کتابخانهی System.Text.Json حالا از polymorphic serialization واقعی پشتیبانی میکنه میتونی typeهای فرزند رو با attribute مثل [JsonDerivedType] ثبت کنی تا بدون custom converter بهدرستی serialize/deserialize بشن #CSharpTips
Something went wrong.
Something went wrong.
United States Trends
- 1. Philip Rivers 10.6K posts
- 2. Colts 27.1K posts
- 3. #WWERaw 16.4K posts
- 4. 49ers 33.3K posts
- 5. Alec Pierce 2,971 posts
- 6. Purdy 9,732 posts
- 7. Niners 5,592 posts
- 8. #ForTheShoe 1,633 posts
- 9. #WLRDeluxe 23.2K posts
- 10. #FTTB 4,094 posts
- 11. Kittle 5,663 posts
- 12. #SFvsIND 1,204 posts
- 13. Kansas 30.6K posts
- 14. Uncle Phil N/A
- 15. Adam the Woo N/A
- 16. CJ West N/A
- 17. Missouri 13.9K posts
- 18. Saleh 8,157 posts
- 19. Arrowhead 10.6K posts
- 20. Greenland 62.5K posts