اشتراک‌ها
روش های مدرن برای ثبت خطا در سی شارپ

Logging is a big part of software development for many years now. One can argue that a logging mechanism is a must-have part of any application or library. I would agree with that statement. Logging has a crucial part to play in a scenario where you can’t use interactive debugging (that is, attaching a debugger like Visual Studio). It allows us to investigate errors after the problem already happened. In some cases, like Production Debugging, logs might be the only information you have. 

روش های مدرن برای ثبت خطا در سی شارپ
اشتراک‌ها
Visual Studio 2019 version 16.4.5 منتشر شد
Visual Studio 2019 version 16.4.5 منتشر شد
نظرات مطالب
ASP.NET MVC #9
به آدرس همین page توی آدرس بار که نگاه میکنم
https://www.dntips.ir/Post/812/asp-net-mvc-9
فکر میکنم Post باید action باشه ... درسته؟ پس تکلیف controller چی میشه...؟
 
اشتراک‌ها
معرفی Windows Sandbox
Windows Sandbox is a new lightweight desktop environment tailored for safely running applications in isolation.
معرفی Windows Sandbox
اشتراک‌ها
NET 6 Release Candidate 2. منتشر شد

We are excited to release .NET 6 Release Candidate 2. It is the second of two “go live” release candidate releases that are supported in production. For the last couple months, the team has been focused exclusively on quality improvements. There are a lot of new features in the release, which only fully come together near the end. The team is currently validating end-to-end workflows to find the places where design intentions and technical reality don’t yet fully match. That’s led to teams tightening leaky pipes and paving paths all the way to their destination. 

NET 6 Release Candidate 2. منتشر شد
نظرات مطالب
C# 6 - String Interpolation
یک نکته‌ی تکمیلی: روش رفع خطای CA1305

با «غنی سازی کامپایلر C# 9.0 با افزونه‌ها» نکات جالبی در کدها ظاهر می‌شوند که یکی از آن‌ها CA1305 است و به صورت خلاصه عنوان می‌کند که اگر متد در حال استفاده، دارای overload ای با پارامتر از نوع IFormatProvider هست، حتما از آن استفاده کنید؛ تا شاهد مشکلاتی مانند « تغییرات مهم مقایسه‌ی رشته‌ها در NET 5.0. » و « از متد DateTime.ToString بدون پارامتر استفاده نکنید! » نباشید. در مورد C# 6 - String Interpolation در متن جاری نکاتی در این مورد عنوان شده‌است. می‌توان جهت تکمیل آن، نکته‌ی ریز زیر را هم مدنظر داشت:
using static System.FormattableString;


var number = 11;
var text = Invariant($"{number}");
System.FormattableString استاندارد، به همراه متد استاتیک Invariant هم هست که همان کار ToString(CultureInfo.InvariantCulture) را انجام می‌دهد. جهت ساده سازی آن هم از ویژگی using static استفاده شده‌است.