اشتراک‌ها
ویژگی های جدید Visual Studio 2017 15.8 Preview 3

Microsoft's release notes highlights for Preview 3 include:

  • Visual Studio now offers .NET Framework 4.7.2 development tools to supported platforms with 4.7.2 runtime included.
  • We improved performance during project unload/reload and branch switching.
  • With added support for Azure Functions, you now have a new target host in the Configure Continuous Delivery to Azure dialog.
  • Git and TFS status now updates properly for external file changes in .NET Core projects.
  • We added new productivity features, such as code cleanup, invert-if refactoring, Go to Enclosing Block, Multi-Caret support, and new keyboard profiles.
  • C++ enhancements include Template IntelliSense, convert macro to constexpr lightbulbs, and experimental in-editor code analysis squiggles.
  • You can now use cross-language debugging with Python 3.7.0rc1.
  • Performance Profiling now offers the ability to pause/resume data collection and adds a new .NET Object Allocation Tracking tool.
  • We included improvements for Android incremental builds in the Xamarinsupport for Xcode 9.4.
  •  
ویژگی های جدید Visual Studio 2017 15.8 Preview 3
مطالب
امکان تعریف ویژگی‌ها بر روی توابع محلی در C# 9.0

یکی از ویژگی‌های جدید اضافه شده به سی شارپ 9، Attributes on local functions نام دارد و این توانایی را به ما می‌دهد تا بر روی متد‌های محلی که درون متدها تعریف می‌شوند، Attributes قرار دهیم. قابلیت local functions در نسخه 7 سی شارپ اضافه شده‌است و با استفاده از این قابلیت می‌توانیم درون یک متد، تابع دیگری را تعریف کنیم و در همان متد، از آن تابع درونی استفاده کنیم. در واقع تابع درونی، لوکال متد بیرونی است و در خارج از متد بیرونی، قابل دسترسی نیست. مانند مثال زیر:

    // Main method 
    public static void Main()
    {
        // Local Function 
        void AddValue(int a, int b)
        {
            Console.WriteLine("Value of a is: " + a);
            Console.WriteLine("Value of b is: " + b);
            Console.WriteLine("Sum of a and b is: {0}", a + b);
            Console.WriteLine();
        }

        // Calling Local function 
        AddValue(20, 40);
        AddValue(40, 60);
    }

برای بررسی این ویژگی جدید سی شارپ 9.0، از یک مثال استفاده می‌کنیم. فرض کنید یک برنامه‌ی کنسول را داریم و می‌خواهیم یک قطعه کد فقط در حالتی در خروجی نوشته شود که برنامه در حالت دیباگ اجرا شده باشد و اگر در حالت ریلیز باشد، در خروجی مشاهده نشود. قبل از نسخه‌ی 9.0 سی شارپ، مجبور هستیم از directive های کامپایلر زبان استفاده کنیم و از طریق آن به کامپایلر بفهمانیم که چه زمانی این قطعه کد را کامپایل کند. مانند مثال زیر:

        static void Main(string[] args)
        {
            static void DoAction()
            {
                // DoAction

                Console.WriteLine("DoAction...");
            }

#if DEBUG
            DoAction();
#endif
        }

اما با استفاده قابلیت اضافه شده‌ی در این نسخه از سی شارپ، می‌توان روی متدهای محلی هم Attributes اضافه کرد. پس می‌توانیم از ConditionalAttribute استفاده کنیم و آن را در بالای متد محلی قرار دهیم و از کامپایلر بخواهیم در حالت دیباگ اجرا شود. مانند کد زیر

        static void Main(string[] args)
        {
            [Conditional("DEBUG")]
            static void DoAction()
            {
                // Do Action Here

                Console.WriteLine("Do Action...");
            }

            DoAction();
        }

اگر بر روی متدهای محلی C# 8.0 از Attribute استفاده کنیم، با خطای زیر روبرو می‌شویم:

ErrorCS8400Feature 'local function attributes' is not available in C# 8.0. Please use language version 9.0 or greater.
اشتراک‌ها
انتشار نسخه اول پیش‌نمایش دات‌نت ۸

Welcome to .NET 8! The first preview is ready for you to download: claim your copy of the first .NET 8 preview and start building applications today. Scroll down to see the list of features included in this preview. .NET 8 is a long-term support (LTS) release. This blog post covers the major themes and goals that drive the prioritization and selection of enhancements to develop. .NET 8 preview and release candidate builds will be delivered monthly. As usual, the final release will be delivered sometime in November at .NET Conf. 

انتشار نسخه اول پیش‌نمایش دات‌نت ۸
اشتراک‌ها
NET Core 3 Preview 3. منتشر شد

Today, we are announcing .NET Core 3.0 Preview 3. We would like to update you on the .NET Core 3.0 schedule and introduce you to improvements in .NET Core SDK installers, Docker containers, Range, and Index. We also have updates on the Windows Desktop and Entity Framework projects. 

NET Core 3 Preview 3. منتشر شد
اشتراک‌ها
لیستی از C# Source Generators

C# Source Generators

A list of C# Source Generators (not necessarily awesome), because I haven't found a good list yet.

C# Source Generators is a Roslyn compiler feature introduced in C#9/.NET 5. It lets C# developers inspect user code and generate new C# source files that can be added to a compilation. 

لیستی از C# Source Generators
مطالب
املای صحیح فناوری‌های مرتبط با مایکروسافت

به نظر شما .net درست است یا .Net یا ... ؟
Asp.net چطور؟ آیا ASP.Net درست است یا Asp.net یا ... ؟!
Direct X درست است یا Direct-X یا ... ؟
Linq درست است یا linq یا ...؟

پاسخ: هیچکدام!
املای تمامی موارد ذکر شده نادرست است. جدولی را یکی از کارکنان مایکروسافت در این زمینه تهیه کرده است که در آدرس ذیل می‌توانید مشاهده نمائید: