اشتراک‌ها
بررسی تازه‌های C# 9, 10 و 11

What's new in C#? - Exciting new features in C# 9, 10 and 11! - Filip Ekberg - NDC Oslo 2023

We will cover the following features:
- Nullable reference types
- Pattern Matching in C# 8 = C# 11
- Record types
- Top level programs/statements
- Init only & new()
 

بررسی تازه‌های C# 9, 10 و 11
بازخوردهای پروژه‌ها
عدم ارسال ایمیل در هاست
با سلام وتشکر از پروژه خوب شما
من از کدهای ایمیل شما استفاده کردم در لوکال هاست به درستی کار میکند و ایمیل ارسال میشود ولی در هاست ایمیل ارسال نمیشود و(البته پیغام ارسال شدن کد رو نیز میدهد) من از جیمیل برای ارسال ایمیل استفاده کردم و گوگل ایمیل زیر رو برام ارسال کرد
Someone recently used your password to try to sign in to your Google Account 
MyEmail@gmail.com. 
This person was using an application such as an email client or mobile device. 

We prevented the sign-in attempt in case this was a hijacker trying to access your account. Please review the details of the sign-in attempt: 

if you do not recognize this sign-in attempt, someone else might be trying to access your account. You should sign in to your account and reset your password immediately.
به نظرتون چرا در هاست از ارسال ایمیل جلوگیری میکنه؟
آیا باید در هاست تنظیمات دیگری رو نیز اعمال کنیم؟
با تشکر
اشتراک‌ها
چهار قانون بهتر برای طراحی نرم‌افزار

Kent’s rules, from Extreme Programming Explained are:

  • Runs all the tests
  • Has no duplicated logic. Be wary of hidden duplication like parallel class hierarchies
  • States every intention important to the programmer
  • Has the fewest possible classes and methods

In my experience, these don’t quite serve the needs of software design. My four rules might be that a well-designed system:

  • is well-covered by passing tests.
  • has no abstractions not directly needed by the program.
  • has unambiguous behavior.
  • requires the fewest number of concepts.
چهار قانون بهتر برای طراحی نرم‌افزار
اشتراک‌ها
معرفی Dev Home

From the team that brought you Windows Terminal, Windows Subsystem for Linux, PowerToys and Windows Package Manager (WinGet), we are excited to introduce Dev Home, a new open-source experience in Windows created just for developers.  

معرفی Dev Home
اشتراک‌ها
NET 8 Preview 3. منتشر شد

.NET 8 Preview 3 is now available. It includes changes to build paths, workloads, Microsoft.Extensions, and containers. It also includes performance improvements in the JIT, for Arm64, and dynamic PGO. If you missed the March preview, you may want to read the Preview 2 post. 

NET 8 Preview 3. منتشر شد
اشتراک‌ها
روش های مقایسه اشیاء با 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
اشتراک‌ها
خالق پایتون به مایکروسافت پیوست

Creator of Python, Guido van Rossum, has joined Microsoft as a Distinguished Engineer in the Developer Division. His stated aim is to make Python better. We can't wait to find out what that results in.  

خالق پایتون به مایکروسافت پیوست