اشتراک‌ها
روش های مقایسه اشیاء با null

Check

Code 

Description

Is Null
if(variable is null) return true;

  • 🙂 This syntax supports static analysis such that later code will know whether variable is null or not.
  • 🙁 Doesn’t produce a warning even when comparing against a non-nullable value type making the code to check pointless.
  • 😐 Requires C# 7.0 because it leverages type pattern matching.
Is Not Null
if(variable is { }) return false

  • 🙂 This syntax supports static analysis such that later code will know whether variable is null or not.
  • 😐 Requires C# 8.0 since this is the method for checking for not null using property pattern matching.
Is Not Null
if(variable is object) return false

  • 🙂 Triggers a warning when comparing a non-nullable value type which could never be null
  • 🙂 This syntax works with C# 8.0’s static analysis so later code will know that variable has been checked for null.
  • Checks if the value not null by testing whether it is of type object.  (Relies on the fact that null values are not of type object.)
Is Null
if(variable == null) return true

  • 🙂 The only way to check for null prior to C# 7.0.
  • 🙁 However, because the equality operator can be overridden, this has the (remote) possibility of failing or introducing a performance issue.
Is Not Null
if(variable != null) return false

  • 🙂 The only way to check for not null prior to C# 7.0.
  • 😐 Since the not-equal operator can be overridden, this has the (remote) possibility of failing or introducing a performance issue. 
روش های مقایسه اشیاء با null
اشتراک‌ها
نگارش April 2020 برنامه‌ی Azure Data Studio منتشر شد

The April release of the Azure Data Studio. Included in this release is:

- Added a new Welcome page.
- Added new markdown toolbar for Notebooks.
- Announcing KQL Magic support in Notebooks.
- Charting in SQL Notebooks can now be saved.
- Announcing improvements to Azure Data Studio dashboards.
- Support for Always Encrypted.
- Bug fixes.
 

نگارش April 2020 برنامه‌ی Azure Data Studio منتشر شد
اشتراک‌ها
دریافت آخرین به روز رسانی تجمعی SQL Server 2016 SP1
  • This update contains fixes for issues that were fixed after the release of SQL Server 2016 SP1.
  • The latest 2016 SP1 update is CU2 - 4013106
  • You may have been directed here from a previous SP1 Cumulative Update Knowledge Base (KB) article (See SQL Server 2016 SP1 build versions)
  • This Cumulative Update includes all fixes from all previous SP1 Cumulative Updates, therefore it can be installed to resolve issues fixed in any previous SP1 CU 
دریافت آخرین به روز رسانی تجمعی SQL Server 2016 SP1
نظرات مطالب
مسیریابی در AngularJs #بخش اول
سلام این نمونه کد در فایرفاکس به درستی کار میکنه ولی در گوگل کروم یا ie با خطاهای  زیر مواجه میشم
1)OPTIONS file:///E:/Users/admin/Downloads/Compressed/RouteExample/RouteExample/templates/page_two.html No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. angular.min.js:99


2)XMLHttpRequest cannot load file:///E:/Users/admin/Downloads/Compressed/RouteExample/RouteExample/templates/page_two.html. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

اشتراک‌ها
Visual Studio 2019 version 16.6.3 منتشر شد
Visual Studio 2019 version 16.6.3 منتشر شد
اشتراک‌ها
فناوری blockchain چیست

So, what is a blockchain? It's a complicated question because the inventor of Bitcoin, the pseudonymous Satoshi Nakamoto, didn't use the term in the original Bitcoin paper. For many, “the blockchain” is nothing more than a shorthand for "how Bitcoin works." But more usefully, the blockchain is a distributed ledger, shared by untrusted participants, with strong guarantees about accuracy and consistency

فناوری blockchain چیست
اشتراک‌ها
انتشار Visual Studio Code - Update 1 - 0.3.0
This is the first of a set of regular updates – we are targeting a new release each month.  In this first one we have over 300 improvements and bug-fixes and to help you get an overview we have added a new Updates section to our website.
انتشار Visual Studio Code - Update 1 - 0.3.0
نظرات مطالب
پردازش داده‌های جغرافیایی به کمک SQL Server و Entity framework
با تغییر Platform همه پروژه‌ها به x86، مشکل اجرای کلی پروژه پیش آمد و با بررسی زیاد، مشکل از نسخه اجرایی IIS بود که قبلا بر روی x64 تنظیم کرده بودم. برای غیرفعال سازی آن از طریق Tools -> Option -> Projects and Solutions -> Web Projects -> Use the 64 bit version of IIS Express for web sites and projects این کار را انجام دادم.