View On GitHub
reading-notes
Reading Notes for Codefellows!
Project maintained by
AlanYHung
Hosted on GitHub Pages — Theme by
mattgraham
Code 401 ASP.NET
Reading 04
(All My Notes are attributed/sourced from the Resources directly preceding them.)
Summary
Classes are reference type variables that are used to create objects.
Classes are capable of inheriting the properties and methods of other classes
Constructors are methods that have the same name as it’s type.
Constructors are used to help instantiate instances of new Objects.
Constructors can be static to initialize static fields with values.
Properties are class members that provide the mechanisms for reading, writing, and/or computing the private fields in a class.
There can be multiple constructors in a class with different parameters. This is called Overloading.
Deconstructors reset an instance of an object back to base form.
C# has auto-implemented properties
Class properties use get accessors and setter accessors.
Stack memory keeps track of the order of how code is executed
Heap memory keeps track of data and can be accessed in any order.
Garbage Collection is the act of allocating and freeing up memory space.
This is important so that your program does not use all the RAM of a computer and lower the performance of the computer’s OS.
C# provides automated garbage collection, but it is important to understand it in order to write the most efficient program.
Resources
Classes (C# Programming Guide)
Author: Microsoft Docs
Article Source
Constructors (C# Programming Guide)
Author: Microsoft Docs
Article Source
Properties (C# Programming Guide)
Author: Microsoft Docs
Article Source
Fundamentals of garbage collection
Author: Microsoft Docs
Article Source
C# Heap(ing) Vs Stack(ing) In .NET - Part One
Author: Matthew Cochran
Article Source
C# 7.0 in a Nutshell (Chapter 3)
Authors: Joseph Albahari & Ben Albahari
<– Back