- Performance improvements in the core debugger
- Support for .NET 6 , which can be used to build web, client and mobile apps by both Windows and Mac developers, as well as improved support for developing Azure apps
- An update UI meant to reduce complexity and which will add integration with Accessibility Insights. Microsoft plans to update the icons and add support for Cascadia Code , a new fixed-width font for better readability
- Support for C++ 20 tooling. language standardization and Intellisense
- Integration of text chat into the Live Share collaboration feature
- Additional support for Git and GitHub
- Improved code search
ده گام برای امنیت نرم افزار
OWASP’s Top 10 Risk List is an important tool for security engineers and compliance analysts. It describes the 10 worst security problems that are found in web and mobile applications today. But, on its own, it’s not much help to developers, so OWASP has come up with a list of 10 things that you can do as a developer to make sure that your code is safe and secure.
1.Visual Studio 2017 15.7 منتشر شد
These are the customer-reported issues addressed in 15.7.1:
- This release includes a fix that reduces memory usage and GC pressure during solution load.
Microsoft Security Advisory for .NET Core Denial Of Service Vulnerability
CVE-2018-0765
Microsoft is releasing this security advisory to provide information about a vulnerability in .NET Core and .NET native version 2.0. This advisory also provides guidance on what developers can do to update their applications to remove this vulnerability.
Microsoft is aware of a denial of service vulnerability that exists when .NET Framework and .NET Core improperly process XML documents. An attacker who successfully exploited this vulnerability could cause a denial of service against a .NET Framework, .NET Core, or .NET native application.
The update addresses the vulnerability by correcting how .NET Framework, .NET Core, and .NET native applications handle XML document processing.
If your application is an ASP.NET Core application, developers are also advised to update to ASP.NET Core 2.0.8.
0.Visual Studio 2017 15.9 منتشر شد
Summary of Notable New Features in 15.9
- You can now import and export an installation configuration file that specifies which workloads and components should be installed with an instance of Visual Studio.
- We have improved the debugging experience for NuGet packages using the new symbol package format (.snupkg).
- Step back in debugger is now available in C++ for Enterprise customers.
- C++ IntelliSense now responds to changes in the remote environment for both CMake and MSBuild projects targeting Linux.
- We have made updates to UWP Desktop Bridge framework packages and added support for ARM64 C++ Native Desktop scenarios.
- We added support for the range-v3 library with the MSVC 15.9 compiler.
- We fixed several bugs in the F# compiler and F# tools.
- Language service support for new TypeScript features for semantic file renaming and project references.
- Improved Node.js development by updating Vue.js templates and adding support for unit testing using the Jest framework.
- We added SharePoint 2019 project templates, so you can migrate existing SharePoint 2013 and 2016 projects to SharePoint 2019.
- Visual Studio Tools for Xamarin now supports Xcode 10.
- We made improvements to the Xamarin.Android build performance.
- We have added and improved features for Universal Windows Platform developers, including ARM64 support, the latest preview SDK, better debugging of Desktop Bridge applications, and XAML Designer improvements.
- Substantial improvements were made to the experience of using authenticated package feeds.
- There is now support for lock file to enable repeatable restore for PackageReference based projects.
- We have added support for the new license format for NuGet packages.
- We have introduced NuGet client policies in Visual Studio which enables you to lock down environments such that only trusted packages can be installed.
- We made the use of .NET Core within Visual Studio more predictable.
Top Issues Fixed in 15.9
- No way to change "Find All References" background color.
- "Visual C++ Resource Editor Package" load failed.
- VS2017 v15.8 Build does not start if XAML files are not manually saved first.
- Installation failed - manifest signature verification failed.
- Update 15.8.6 breaks Installer Projects.
- Scrolling up with the arrow key causes Visual Studio to page up.
- After updating to 15.8.1, data tip does not show when debugging.
- System.InvalidProgramException: Common Language Runtime detected an invalid program..
- Solution Explorer does not remain pinned after closing Visual Studio.
- Navigation bar in editor has trouble handling long method names.
نوع شمارشی، یک نوع صحیح است و شامل لیستی از ثوابت میباشد که توسط برنامه نویس مشخص میگردد . انواع شمارشی برای تولید کد خودمستند به کار میروند یعنی کدی که به راحتی قابل درک باشد و نیاز به توضیحات اضافه نداشته باشد. زیرا به راحتی توسط نام ، نوع کاربرد و محدوده مقادیرشان قابل درک میباشند . مقادیر نوع شمارشی منحصربه فرد میباشند (unique) و شامل مقادیر تکراری نمیباشند در غیر این صورت کامپایلر خطای مربوطه را هشدار میدهد . نحوه تعریف نوع شمارشی :
enum typename{enumerator-list}
enum Day{SAT,SUN,MON,TUE,WED,THU,FRI}
Day day1,day2; day1 = SAT; day2 = SUN;
enum Day{SAT=1,SUN=2,MON=4,TUE=8,WED=16,THU=32,FRI=64}
enum Day{SAT=1,SUN,MON,TUE,WED,THU,FRI}
میتوان به شمارشگرها مقادیر یکسانی نسبت داد
enum Answer{NO=0,FALSE=0,YES=1,TRUE=1,OK=1}
enum Answer{NO=0,FALSE=0,YES=1,YES=2,OK=1}
1- enum سبب میشود که شما مقادیر مجاز و قابل انتظار را به متغیرهایتان نسبت دهید .
2- enum اجازه میدهد با استفاده از نام به مقدار دستیابی پیدا کنید پس کدهایتان خواناتر میشود .
3- با استفاده از enum تایپ کدهایتان سریع میشود زیرا IntelliSense در مورد انتخاب گزینه مناسب شما را یاری میدهد .
چند تعریف از enum :
enum Color{RED,GREEN,BLUE,BLACK,ORANGE} enum Time{SECOND,MINUTE,HOUR} enum Date{DAY,MONTH,YEAR} enum Language{C,DELPHI,JAVA,PERL} enum Gender{MALE,FEMALE}
اما تغییراتی که در c++11 اعمال شده : Type-Safe Enumerations
فرض کنید دو enum تعریف کرده اید و به شکل زیر میباشد
enum Suit {Clubs, Diamonds, Hearts, Spades}; enum Jewels {Diamonds, Emeralds, Opals, Rubies, Sapphires};
برای تعریف جدیدی که در c++11 داده شده کلمه کلیدی class بعد از کلمه enum مورد استفاده قرار میگیرد . به طور مثال تعریف دو enum پیشین که با خطا مواجه میشد بصورت زیر تعریف میشود و از کامپایلر خطایی دریافت نمیکنیم .
enum class Suit {Clubs, Diamonds, Hearts, Spades}; enum class Jewels {Diamonds, Emeralds, Opals, Rubies, Sapphires};
enum Suit {Clubs, Diamonds, Hearts, Spades}; Suit var1 = Clubs; int var2= Clubs;
enum class Jewels {Diamonds, Emeralds, Opals, Rubies, Sapphires}; Jewels typeJewel = Jewels::Emeralds; int suitValue = static_cast<int>(typeJewel);
یک مثال کلی و جامعتر :
// Demonstrating type-safe and non-type-safe enumerations #include <iostream> using std::cout; using std::endl; // You can define enumerations at global scope //enum Jewels {Diamonds, Emeralds, Rubies}; // Uncomment this for an error enum Suit : long {Clubs, Diamonds, Hearts, Spades}; int main() { // Using the old enumeration type... Suit suit = Clubs; // You can use enumerator names directly Suit another = Suit::Diamonds; // or you can qualify them // Automatic conversion from enumeration type to integer cout << "suit value: " << suit << endl; cout << "Add 10 to another: " << another + 10 << endl; // Using type-safe enumerations... enum class Color : char {Red, Orange, Yellow, Green, Blue, Indigo, Violet}; Color skyColor(Color::Blue); // You must qualify enumerator names // Color grassColor(Green); // Uncomment for an error // No auto conversion to numeric type cout << endl << "Sky color value: "<< static_cast<long>(skyColor) << endl; //cout << skyColor + 10L << endl; // Uncomment for an error cout << "Incremented sky color: " << static_cast<long>(skyColor) + 10L // OK with explicit cast << endl; return 0; }
شروع کار با اورلیا
سایت LearnAsync.NET
Here are some of the reasons why nullable reference types are less than ideal:
- Invoking a member on a null value will issue a System.NullReferenceException exception, and every invocation that results in a System.NullReferenceException in production code is a bug. Unfortunately, however, with nullable reference types we “fall in” to doing the wrong thing rather than the right thing. The “fall in” action is to invoke a reference type without checking for null.
- There’s an inconsistency between reference types and value types (following the introduction of Nullable<T>) in that value types are nullable when decorated with “?” (for example, int? number); otherwise, they default to non-nullable. In contrast, reference types are nullable by default. This is “normal” to those of us who have been programming in C# for a long time, but if we could do it all over, we’d want the default for reference types to be non-nullable and the addition of a “?” to be an explicit way to allow nulls.
- It’s not possible to run static flow analysis to check all paths regarding whether a value will be null before dereferencing it, or not. Consider, for example, if there were unmanaged code invocations, multi-threading, or null assignment/replacement based on runtime conditions. (Not to mention whether analysis would include checking of all library APIs that are invoked.)
- There’s no reasonable syntax to indicate that a reference type value of null is invalid for a particular declaration.
- There’s no way to decorate parameters to not allow null.
معرفی C# Dev Kit
The C# Dev Kit leverages the core C# language services and delivers additional productivity value to developers.