#csharptips resultados da pesquisa
در .NET 8، از IFormFile.CopyToAsync(Stream, CancellationToken) استفاده کن تا آپلود فایلها رو ایمنتر و قابل لغو کنی بهتر از روشهای قدیمی هست چون memory کمتر مصرف میکنه و responsiveتره (async و cancelation token اضافه شده) #CSharpTips
Elevate your C# knowledge one tip at a time! 🌟 #CSharpTips #Tuples #Deconstruction #CodingMagic #jetbrainsrider #rider
By using extension methods, you can enhance built-in or custom classes, making your code more readable and modular. **#CSharpTips #ExtensionMethods #CodeEnhancements #SoftwareEngineering #CodeReadability**
Let's talk optimisation and pooling! In Unity, allocation can seem pretty simple since everything is handled by the language. Most of us call "new" on class without blinking. The truth is we should blink, a lot. #unitytips #csharptips
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
Según me vaya dando, iré escribiendo pequeños consejos y micro-tutoriales de uno de los lenguajes más usados hoy en día, sobre todo gracias a Xamarin y Unity #CSharpTips
💡 Did you know that C# has local functions that help unclutter your code? 💡 They are great when you need to repeat yourself several times with a method, but exposing this method your class is meaningless elsewhere. #unity3d #unitytips #csharptips
در .NET 8، از TypedResults در Minimal API استفاده کن. بهجای برگردوندن object خام، خروجی دقیق مثل TypedResults.Ok(), NotFound() بده کد strongly-typed، خواناتر خطای کمتر در زمان کامپایل #CSharpTips
Whenever possible, in C#, use Lambda-bodied expressions instead of conventional method bodies. Why? - It makes code declarative, instead of imperative - It prevents mutable variable assignments - It is 2 lines shorter #csharp #csharptips #programming
در .NET 8، میتونی از Rate Limiting Middleware استفاده کنی مستقیماً در pipeline درخواستها محدودیت درخواست تعریف کن، بدون نیاز به پکیج خارجی کنترل ترافیک جلوگیری از abuse حفظ پایداری سرویس #CSharpTips
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)
در .NET 8 به بعد، FrozenDictionary و FrozenSet معرفی شدن ساختارهایی immutable و optimized for read performance #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
وقتی داری از struct استفاده میکنی حواست باشه 1-برای داده های کوچک و immutable مناسبه 2- مقدارش by value ذخیره میشه و کپی میشه #CSharpTips
در C# 12 میتونی از Primary Constructors نهفقط برای record، بلکه برای class و struct هم استفاده کنی -کمتر boilerplate مینویسی - dependencies are immutable مناسب برای clean architecture و service-oriented design #CSharpTips
#unityTips #CSharpTips How to remove lambda listener from the event? Create a delegate instance field from the lambda. Assign it to the listener. Then, if you need, remove it from the listener. Ref: stackoverflow.com/questions/1362…
#CsharpTips Tips for writing better C# codes:buff.ly/2Hpihny #Programminghelp #coding #assignmenthelp #college #students
در .NET 8، از IFormFile.CopyToAsync(Stream, CancellationToken) استفاده کن تا آپلود فایلها رو ایمنتر و قابل لغو کنی بهتر از روشهای قدیمی هست چون memory کمتر مصرف میکنه و responsiveتره (async و cancelation token اضافه شده) #CSharpTips
در .NET 8، از app.MapFallback() استفاده کن تا درخواستهای بدون مسیر مشخص رو مدیریت کنی. ایدهآل برای SPAها (مثل React/Vue) یا صفحات خطای سفارشی کدت تمیزتر و routing پیشبینیپذیرتر میشه #CSharpTips
در .NET 8، از TypedResults در Minimal API استفاده کن. بهجای برگردوندن object خام، خروجی دقیق مثل TypedResults.Ok(), NotFound() بده کد strongly-typed، خواناتر خطای کمتر در زمان کامپایل #CSharpTips
در .NET 8، از MapGroup + versioning برای API نسخهدار استفاده کن. هر نسخهی API رو در یه گروه بساز و middleware یا policy مخصوص خودش رو بده مدیریت نسخهها تمیز، مقیاسپذیر و قابلنگهداریتر میشه #CSharpTips
در .NET 8، از OutputCache middleware استفاده کن تا خروجی endpointها رو کش کنی میتونی بر اساس path، header یا query params کلید کش بسازی کاهش فشار روی دیتابیس و پاسخدهی آنی #CSharpTips
در .NET 8، از keyed services در DI استفاده کن. میتونی چند پیادهسازی از یه interface داشته باشی و با کلید مشخص انتخابشون کنی دیگه نیازی به if-else یا factory دستی نیست، تزریق تمیز و منعطفتر #CSharpTips
در .NET 8، برای validation تمیزتر، از IEndpointFilter در Minimal API استفاده کن. میتونی منطق اعتبارسنجی، authorization یا logging رو قبل از اجرای handler جدا کنی _کد تمیزتر، تستپذیرتر و قابلگسترشتر #CSharpTips
در EF Core 8 میتونی از JSON column mapping استفاده کنی اینجوری propertyهای complex رو مستقیم داخل ستون JSON ذخیره کن. سازگاری مناسب با PostgreSQL و SQL Server #CSharpTips
تو entity framework) ورژن های جدیدترش) میتونی از ExecuteUpdate و ExecuteDelete استفاده کنی. بدون load کردن entity ها، مستقیم query SQL اجرا میکنه - سرعت بالا و مصرف حافظهی کمتر #CSharpTips
در .NET 8، میتونی از Rate Limiting Middleware استفاده کنی مستقیماً در pipeline درخواستها محدودیت درخواست تعریف کن، بدون نیاز به پکیج خارجی کنترل ترافیک جلوگیری از abuse حفظ پایداری سرویس #CSharpTips
در .NET 8 ، استفاده از ThreadPool بهینهتر شده و خودش adaptive scaling داره یعنی بدون تنظیم دستی، خودش براساس فشار CPU و I/O تعداد تردها رو تنظیم میکنه. نتیجه؟ عملکرد بهتر و مصرف CPU کمتر #CSharpTips
در .NET 8، ویژگی Metrics APIs اضافه شده؛ ابزاری داخلی برای جمعآوری و ثبت متریکها مثل latency، count و histogram بدون نیاز به کتابخانه خارجی. مناسب برای observability و مانیتورینگ. #CSharpTips
در C# 12 میتونی از default lambda parameters استفاده کنی. حالا لامبداها هم مثل متدها پارامتر پیشفرض دارن. باعث میشه کد کوتاهتر بشه انعطافپذیری بیشتر در delegateها میشه داشت #CSharpTips
در .NET 8 میتونی از TimeProvider استفاده کنی تا وابستگی به DateTime.UtcNow رو از بین ببری یعنی زمان هم قابل mock و تست میشه #CSharpTips
در C# فرق زیادی بین throw; و throw ex; هست - throw; → exception رو دوباره پرتاب میکنه و StackTrace اصلی حفظ میشه - throw new ex; → StackTrace رو ریست میکنه 🔹 همیشه برای حفظ context واقعی از throw; استفاده کن. #CSharpTips
در .NET 8 به بعد، FrozenDictionary و FrozenSet معرفی شدن ساختارهایی immutable و optimized for read performance #CSharpTips
در C# 12 میتونی از Primary Constructors نهفقط برای record، بلکه برای class و struct هم استفاده کنی -کمتر boilerplate مینویسی - dependencies are immutable مناسب برای clean architecture و service-oriented design #CSharpTips
در C# هر بار از async void استفاده میکنی، یه exception ممکنه از کنترل خارج بشه و کل برنامه رو کرش بده فقط برای event handlerها از async void استفاده کن. برای بقیه همیشه async Task بنویس. #CSharpTips
در C#، وقتی متدی مقدار رو بلافاصله برمیگردونه، استفاده از ValueTask بهجای Task میتونه allocation-free باشه و GC pressure رو کم کنه. فقط حواست باشه که یکبار await اش کنی #CSharpTips
در C# هر بار که async متد تعریف میکنی، کامپایلر پشت صحنه یه state machine میسازه. اگه متد واقعاً async نیست، این overhead بیدلیله #CSharpTips
Elevate your C# knowledge one tip at a time! 🌟 #CSharpTips #Tuples #Deconstruction #CodingMagic #jetbrainsrider #rider
By using extension methods, you can enhance built-in or custom classes, making your code more readable and modular. **#CSharpTips #ExtensionMethods #CodeEnhancements #SoftwareEngineering #CodeReadability**
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
Let's talk optimisation and pooling! In Unity, allocation can seem pretty simple since everything is handled by the language. Most of us call "new" on class without blinking. The truth is we should blink, a lot. #unitytips #csharptips
💡 Did you know that C# has local functions that help unclutter your code? 💡 They are great when you need to repeat yourself several times with a method, but exposing this method your class is meaningless elsewhere. #unity3d #unitytips #csharptips
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)
Según me vaya dando, iré escribiendo pequeños consejos y micro-tutoriales de uno de los lenguajes más usados hoy en día, sobre todo gracias a Xamarin y Unity #CSharpTips
Whenever possible, in C#, use Lambda-bodied expressions instead of conventional method bodies. Why? - It makes code declarative, instead of imperative - It prevents mutable variable assignments - It is 2 lines shorter #csharp #csharptips #programming
#unityTips #CSharpTips How to remove lambda listener from the event? Create a delegate instance field from the lambda. Assign it to the listener. Then, if you need, remove it from the listener. Ref: stackoverflow.com/questions/1362…
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
#CsharpTips Tips for writing better C# codes:buff.ly/2Hpihny #Programminghelp #coding #assignmenthelp #college #students
🔸 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
Something went wrong.
Something went wrong.
United States Trends
- 1. Austin Reaves 40.1K posts
- 2. Steelers 83.7K posts
- 3. Packers 65.2K posts
- 4. Tomlin 12.2K posts
- 5. Tucker Kraft 15.1K posts
- 6. Jordan Love 16K posts
- 7. #GoPackGo 10.6K posts
- 8. Derry 18.7K posts
- 9. #LakeShow 3,608 posts
- 10. #BaddiesAfricaReunion 8,401 posts
- 11. Aaron Rodgers 19.6K posts
- 12. Pretty P 3,701 posts
- 13. #LaGranjaVIP 67.1K posts
- 14. Teryl Austin 2,137 posts
- 15. Zayne 18.5K posts
- 16. Dolly 12.1K posts
- 17. #HereWeGo 7,500 posts
- 18. Sabonis 2,385 posts
- 19. Green Bay 10.9K posts
- 20. Karola 4,117 posts