اشتراک‌ها
با سی شارپ 8 از دست NullReferenceExceptions ها خلاص شوید

A .NET guideline specifies that an application should never throw a NullReferenceException. However, many applications and libraries do. The NullReferenceException is the most common exception happening. That’s why C# 8 tries to get rid of it. With C# 8, reference types are not null be default. This is a big change, and a great feature. However, what about all the legacy code? Can old libraries be used with C# 8 applications, and can C# 7 applications make use of C# 8 libraries?

This article demonstrates how C# 8 allows mixing old and new assemblies. 

با سی شارپ 8 از دست NullReferenceExceptions ها خلاص شوید
نظرات مطالب
مروری بر کاربردهای Action و Func - قسمت اول
فکر نمی‌کنم به خاطر دات نت 1 باشه. دلیلی فراتر از این وجود داره. با کمی جستجو، این لینک که بر اساس VS 2010 نوشته شده، در پاراگراف آخر دلیل منطقی‌تری رو ارائه میده. در مورد WebGrid که فرمودید، بحثش جداست. من از کامپوننت‌های متن باز Telerik در بستر ASP.NET MVC استفاده می‌کنم و از انعطاف پذیری Action و Func در متدهای اون لذت می‌برم. حرف من در مورد تعریف واجب استفاده از Predefined Delegates به جای اینترفیس‌های تک متدی است.

One good example of using a single-method interface instead of a delegate is IComparable or the generic version, IComparable<T>. IComparable declares the CompareTo method, which returns an integer that specifies a less than, equal to, or greater than relationship between two objects of the same type. IComparable can be used as the basis of a sort algorithm. Although using a delegate comparison method as the basis of a sort algorithm would be valid, it is not ideal. Because the ability to compare belongs to the class and the comparison algorithm does not change at run time, a single-method interface is ideal. 
اشتراک‌ها
فعال سازی browser cache در ASP.NET MVC

The OutputCache attribute does not allow us to dynamically change the cache settings for the current request. As MVC and Web API both rely on different libraries I could not reuse the Web API action filter in MVC so I had to come up with a new solution. This again resulted in two simple classes. 

فعال سازی browser cache در ASP.NET MVC
اشتراک‌ها
Visual Studio 2022 version 17.8.2 منتشر شد
حجم تقریبا آپدیت از نسخه قبلی (17.8.1) حدود 666G میشه.

Summary of What's New in this Release of Visual Studio 2022 version 17.8.2

  • Fixed an issue where, in certain situations, a document window can get stuck showing a loading message.
  • In some cases (when a project is located under a solution folder) you may see an error when saving the project. The project would get saved but you would see an error about unable to cast a COM object. This issue is now fixed so the error is no longer displayed.

Developer Community

Visual Studio 2022 version 17.8.2 منتشر شد
نظرات مطالب
T4MVC : یکی از الزامات مدیریت پروژه‌های ASP.NET MVC
مراجعه کنید به راهنمای مفصل آن. نقل قولی از آن:
Use StaticFilesFolders to tweak the list of folders from which links are generated

<!-- Folders containing static files for which links are generated (e.g. Links.Scripts.Map_js) -->
<StaticFilesFolders>
    <FileFolder>Scripts</FileFolder>
    <FileFolder>Content</FileFolder>
</StaticFilesFolders>
اشتراک‌ها
بررسی تعاریف نواحی زمانی در 120 سال قبل

A 2016 study found that the economic impact of Daylight Saving , due to increased heart attacks, workplace accidents and cyberloafing (slacking off at work!) cost the US economy $434 million each year, there are a great many others that present similar evidence.

In 2019 the European Union voted to abolish daylight saving in 2021, similarly the “Sunshine Protection Act of 2021” is gaining traction in the US. Over the next decade I feel quite sure that most of the globe will reject daylight saving entirely. 

بررسی تعاریف نواحی زمانی در 120 سال قبل