jargon index

class

A class is a data structure that combines state (fields) and actions (methods and other function members) in a single unit.

public class MyClass
{
    public static void Main()
    {
    //code
    }
}

objects

A class provides a definition for dynamically created instances of the class, also known as objects.

types

array

square brackets

crud

// create string array
string[] cars = {"Volvo", "BMW", "Ford", "Mazda"};
// retreive Outputs Volvo
Console.WriteLine(cars[0]);
// update
cars[0] = "Opel";
// length
Console.WriteLine(cars.Length);

// int
int[] myNum = {10, 20, 30, 40};

// delete
int[] numbers = { 1, 3, 4, 9, 2 };
int numToRemove = 4;
numbers = numbers.Where(val => val != numToRemove).ToArray();

loop

string[] cars = {"Volvo", "BMW", "Ford", "Mazda"};
for (int i = 0; i < cars.Length; i++) 
{
  Console.WriteLine(cars[i]);
}

sort

Array.Sort(cars);

constructors

  • constructor types
    • default - no params
    • parameterized - in out ref
    • copy - copies variables from another to add new values to existing
    • static - has to be invoked - executed once - cannot be called directly - does not take access modifiers or input params - called automatically
    • private - not possible for other classes to derive from it or create an instance from it - implementation of a singleton - use when only has static members

assemblies

  • private
    • only accessed from the app
  • shared
    • used by multiple apps
    • installed in gac

  • mdi - multiple windows
  • sdi - each windows has it's own menus, etc.

garbage collection

heap memory

rando

  • linq Language-Integrated Query (LINQ) is the name for a set of technologies based on the integration of query capabilities directly into the C# language
  • cas
  • globalization
  • localization
  • class
  • asp.net
    • app domain
    • web forms
    • mvc
    • entity framework
  • members
  • assembly
  • struct
  • function pointer aka delegate
    • used to create custom event in a class
  • abstract class
  • implementation
  • interface
  • object
  • manifest
    • type meta data
      • msil
  • gac
  • jit
  • cts
    • ctl
  • bcl
  • base class

    • page class
      • web forms
  • memmory allocation

    • stack
      • static app
    • heap
      • dynamic
  • prevent class from inheriting with sealed keyword

Comments