پیشنهاد فرادرس

آموزش Equality و Comparisons در #C

دسته بندی ها: دات نت ، آموزش سی شارپ | C#.NET ، آموزش های پلورال سایت (Pluralsight)

آموزش-equality-و-comparisons-در-c

مبحث مقایسه و برابری رشته ها اعداد و متغیرها در سی شارپ کاربرد زیادی دارد.

در این دوره آموزشی از موسسه Pluralsight با مقایسه و تست برابری متغیرها با نوع های مختلف در C#.NET آشنا می شوید.

سرفصل های دوره آموزشی:

  • Equality دیسک سخت چیست؟
  • ارجاع در مقابل مقدار Equality
  • راه های متعدد برای مقایسه مقادیر
  • Equality در دات نت
  • Equality برای رشته
  • عملگرهای #c
  • کار با اعداد صحیح
  • کار با دکمه ها
  • کار با رشته ها
  • ارزش انواع داده ها
  • برابری برای چندتایی ها
  • پیاده سازی برابری برای ارزش انواع داده ها
  • پیاده سازی GetHashCode ()
  • پیاده سازی Equality برای انواع مرجع
  • کار با نحوه وراثت
  • مقایسه در دات نت
  • پیاده سازی عملگرهای مقایسه
  • ترکیب نسخه ی نمایشی
  • چرا ما نیاز به Comparers داریم ؟
  • نوشتن یک Comparer

عنوان دوره آموزشی: C# Equality and Comparisons سطح: متوسط مدت زمان: 4 ساعت و 51 دقیقه نویسنده: Simon Robinsonلیست سرفصل های دوره آموزشی:

In this course, you'll learn how to use equality and comparisons correctly in your C# code: both how they work out of the box, and how to implement equality and comparisons for your own types. The course also covers working with inheritance, string comparisons, writing custom comparers and equality comparers, hash codes, and structural comparisons. 

Welcome and Course Overview 03:58 Aims of This Course 01:53 So Why Is Equality Hard? 01:49 Reference vs. Value Equality 03:38 Equality, Value Types, and Boxing 03:13 Multiple Ways to Compare Values 03:38 'Natural' vs. 'Plugged-In' Equality 02:49 Equality for Floating Points 02:57 The Equality/OOP/Type-Safety Conflict 02:56 Summary 01:16 Equality in .NET 00:27:22 Overview 01:28 The Virtual Object.Equals() Method 05:00 Equals() for Strings 02:31 Equals() for Value Types 03:36 Object.Equals() - Review 01:31 The Static Equals() Method 03:28 The ReferenceEquals() Method 01:29 Introducing IEquatable<T> 03:06 IEquatable<int> Demo 01:50 IEquatable<T>, Strings and Reference Types 01:44 Summary 01:33 The C# Equality Operator 00:31:01 Overview 02:16 The == Operator for Integers 01:56 == Under the Hood 03:39 The == Operator for Buttons 03:08 The == Operator for Strings 04:36 The == Operator for Value Types 01:39 Equality for Tuples 03:00 Comparing == and Object.Equals() 01:52 == Doesn't Always Work With Inheritance 03:27 == Never Works With Generics 04:06 Summary 01:17 Implementing Equality for Value Types 00:16:53 Overview 01:35 Why Would You Implement Equality for a Value Type? 02:20 How to Implement Equality for a Value Type 02:54 Implementing IEquality<T> 01:00 Overriding Object.Equals() 01:40 Implementing == and != 01:28 Implementing GetHashCode() 02:38 Testing the Code 00:55 Implementing Equality: Review 01:07 Summary 01:13 Implementing Equality for Reference Types 00:34:39 Overview 01:16 Setting Up the Demo 03:57 Why Implement Equality for Reference Types? 03:22 Implementing Equality in the Base Type 04:52 Implementing Equality in the Derived Type 04:00 How NOT to Overload == 05:08 Making == Work With Inheritance 02:27 == and System.Object 01:41 Understanding the Equality/OOP/Type-Safety Conflict 01:40 The Dangers of Implementing IEquatable<T> 02:10 The Importance of Being Sealed 02:33 Summary 01:26 Comparisons in .NET 00:31:36 Overview 01:31 What Is a Comparison? 02:46 Introducing IComparable<T> and CompareTo() 04:51 IComparable<T> With Integers 01:26 Comparisons vs. Equality in .NET 02:53 Comparisons Are Value Only 01:33 When Should You Implement IComparable<T>? 03:04 Implementing IComparable<T> Demo 02:54 Implementing the Comparison Operators 03:06 Implementing the Non-Generic IComparable Interface 02:33 IComparable<T> for Reference Types 01:30 IComparable<T> in Generic Code 02:12 Summary 01:08 Equality and Comparisons for Strings 00:37:13 Overview 01:28 Chars and Unicode Code Points 02:39 Character Expansions 02:11 Surrogates 02:20 Combining Characters 01:45 The Static String.Compare() Method 02:28 Ordinal Comparisons 02:30 Culture-Sensitive Comparisons 01:00 Current Culture vs. Invariant Culture 01:10 Setting Up the String.Compare() Demos 01:33 Uppercase/Lowercase Demo 03:15 Character Expansion Demo 01:32 Combining Character Demo 01:18 Choosing a StringComparison Value 01:39 Choosing a Compare Method 02:18 Equality Comparisons for Strings 01:48 String Pooling and Interning 04:32 Summary 01:39 Comparers and Equality Comparers 00:42:19 Overview 01:27 Why Do We Need Comparers? 04:06 Comparers and IComparer<T> 01:04 Writing a Comparer 02:53 The Comparer<T> Base Class 02:51 Comparers as Singletons 01:12 The Inconsistent Sort Order Problem 03:40 The Problem of Inheritance (Again) 03:02 IComparer<T> vs. IComparable<T> 02:09 Equality Comparers and IEqualityComparer<T> 00:50 How Collections Leverage Equality Comparers 03:59 Implementing an Equality Comparer 03:37 Implementing IEqualityComparer<T>.Equals() 01:08 Implementing IEqualityComparer<T>.GetHashCode() 00:36 Plugging the Equality Comparer Into a Collection 01:21 Default Comparers and Equality Comparers 03:46 The StringComparer Type 02:59 Summary 01:30 Hash Codes and Hashtables 00:25:46 Overview 01:10 What Is a Hashtable? 02:42 How Hashtables Use GetHashCode() 03:39 Equal Objects Must Return the Same Hash Code 03:29 Other GetHashCode() Requirements 01:25 A Basic Hash Code Algorithm 02:00 Exclusive OR for Hash Codes 03:00 When Fields Are Not Used in Equality 03:05 Mapping Strings for Hash Codes 02:38 Putting the Hash Code Algorithm Together 01:21 Summary 01:12 Structural Equality and Comparisons 00:16:27 Overview 01:11 Structural Equality and IStructuralEquatable 05:26 IStructuralComparable 02:47 Module Summary 01:01 Equality and Comparisons Interfaces - Review 02:41 Equality and Comparisons Methods - Review 01:27 Course Summary 01:53

حجم فایل: 1.04GB

به این نوشته امتیاز دهید 1 2 3 4 5 بدون امتیاز
Pluralsight CSharp Equality and Comparisons

پیشنهاد فرادرس