C# Programming (Advanced/Intermediate) Lectures (13/14) will teach you #CSharp #programming from beginner to intermediate/expert level. This course is an excellent source to learn advanced concepts in C# #coding. If you are a beginner to C#, watch our previous course lectures. The playlist link of the previous course is below.
Full playlist of the previous course: C# For Beginners ⤵️
• C# Tutorial: Full Course For Beginner...
Discord ➡️ https://bit.ly/SECoursesDiscord
Patreon ➡️ / secourses
Technology Playlist (30+ Tutorial / Guide / News / Review Videos) ⤵️
• Technology & Science: Tutorials, Tips...
Stable Diffusion Playlist (30+ Tutorial / Guide Videos) ⤵️
• Stable Diffusion Tutorials, Automatic...
Please join discord, mention me and ask me any questions. Thank you for like, subscribe, share and Patreon support. I am open to private consulting with Patreon subscription.
Full playlist of this course ⤵️
• C# Programming (Advanced/Intermediate...
You can watch for free our C# Programming, ASP .NET Core MVC programming, Machine Learning and Software Engineering related courses on our playlists page ⤵️
https://www.youtube.com/@SECourses/pl...
GitHub code repository of this course (source codes of the lectures) ⤵️
https://github.com/FurkanGozukara/Int...
In Lecture 13:
What are heap and stack in .NET C#
What are the difference between stack and heap
Which type of things (e.g. class, enum, int, value type, reference type) are put in stack and heap memory
What are value types, reference types, pointers (references), instructions
What is hash table
What are the differences between hash tables and dictionaries in C#
What is Queue class in C#
How to use Queue, Enqueue, Dequeue, Peek, Contains
What is operator overloading
How to overload + sign for a custom class
What is method extension
How to extend a method for a custom class
How to define long number with L keyword
What is Aggregate method and how to use it
What is method overloading and how to make method overloading on a custom class method
What is method overriding and how to override a method marked as virtual in the parent class
What is struct
How to use structs
What are the differences between struct and class objects
When to use a struct or a class
What is a class finalizer as known as destructor as well
What is dynamic type objects and how to use dynamic type
What are generics
How to define generics using classes and methods
What are the advantageous of generics
What is params keyword and how to invoke a method with any number of input variables by using params object type
What are delegate and events
How to define delegate and events to notify subscribers when an event invokes
What is class coupling and why to avoid exceeding magic number 9
Introduction:
C# is a modern, object-oriented programming language that is used to build a variety of applications ranging from desktop applications to web-based applications. When writing code in C#, it is essential to have an understanding of how the language manages memory and data types. In this article, we will discuss various concepts related to memory management, data types, and other advanced features in C#.
Heap and Stack:
In C#, there are two primary memory regions: the heap and the stack. The stack is a region of memory that is used to store value types, method calls, and function parameters. It is a first-in, last-out (FILO) data structure that allocates memory in a continuous block. The stack is faster than the heap because of its memory allocation method.
On the other hand, the heap is a region of memory that is used to store reference types, objects, and arrays. It is a more flexible data structure that allows memory to be allocated and released in any order. The heap is slower than the stack because of its memory allocation and deallocation process.
Difference between Stack and Heap:
The main difference between the stack and the heap is how they allocate and release memory. The stack allocates memory in a continuous block, while the heap allocates memory randomly. The stack is more efficient in terms of memory allocation and deallocation, while the heap is more flexible.
Types of Things in Stack and Heap:
Value types such as int, bool, char, and float are stored on the stack. They are allocated on the stack when declared, and their memory is deallocated when they go out of scope.
Reference types such as classes, arrays, and objects are stored on the heap. When a reference type is declared, a reference to the object is created on the stack, and the object itself is stored on the heap.
Enumerations or enums are value types that can be used to define a set of named constants. They are stored on the stack.
Pointers or references are variables that hold the memory address of another variable.