loading...
Cover image for C# Resource page

C# Resource page

kironroy profile image Kiron Roy Updated on ใƒป5 min read

This is an updated C# resource page that I have been working on.

The full page is here ๐Ÿ˜ƒ

Console Programs

Notes

Main Method = Is the entry point of the application.
It is a "quarter back method" it tells what the other methods should do (Console Apps)

Solution = is a container that holds different projects

Using statements = shortcut code

References = bring in code

Static Classes = one copy for the entire lifetime of the application. Storing data inside a static class is not a good idea, because it increases the application's memory footprint. They aren't instantiated

  • Static means โ€œassociated with the class, not an instanceโ€.
  • Static member is always accessed by the class name, rather than the instance name, like Forest.Area.
  • Static method cannot access non-static members.
  • Static constructor is run once per type, not per instance. It is invoked before the type is instantiated or a static member is accessed.

Instantiated Classes

Auto Properties = are more common because auto-properties target many types of applications WinForms, WPF, ASP.NET MVC...

Constructor = (ctor) is a method that is not static. It is part of the instantiated class. A constructor is a special type of method when a "car/house" (object) is built. It does not return anything

Method overloading

Extension Methods

Inheritance

Articles

Interface

Articles

Abstract Classes

Abstract Classes and Interface

Value Types: hold actual data

  • int
  • double
  • bool
  • char

Reference Types: refer to a location in memory

  • Classes
  • Objects
  • Arrays
  • Indexers
  • Interfaces

    • Every class is derived from Object โ€” even user-defined classes.
    • Value types and strings also inherit from Object:
    • Strings are immutable: they cannot be changed after they are created. Anything that appears to modify a string actually returns a new string object.

Topics

Posted on by:

Discussion

pic
Editor guide