اشتراک‌ها
چگونه در dotNET Core از Performance Counters استفاده کنیم

Performance counters are really important for monitoring and troubleshooting problems with your .NET applications. The full .NET Framework provides a wide array of performance counters that are very useful for troubleshooting application problems. 

چگونه در dotNET Core از Performance Counters استفاده کنیم
اشتراک‌ها
روش های مقایسه اشیاء با 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
نظرات مطالب
SQL تولیدی در NHibernate از کدام متد صادر شده است؟
استفاده از StackTrace برای پیاده سازی INPC به نظرتون مشکل Performance ایجاد میکنه؟

http://csharperimage.jeremylikness.com/2010/12/jounce-part-8-raising-property-changed.html
نظرات مطالب
مروری بر کتابخانه ReactJS - قسمت دوم - نصب و پیکربندی React‌JS برای Visual Studio Code
سلام؛ بر اساس مستند‌ات React  این کتابخانه بدون مشکل با زبان‌های NET. و ASP.NET MVC کار میکنه و مثال‌هایی هم برای کار با این کتابخانه در پروژه‌های ASP.NET MVC در اینجا و اینجا میتونید ببینید. بسته به پروژه ممکنه ملاحظاتی وجود داشته باشه، اما در مجموع منعی برای استفاده هم زمان بین این دو ندیدم.