DEV Community

Kiron Roy
Kiron Roy

Posted on • Updated on

C# Resource page

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

The full page is here 😃

Console Programs


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





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.


Discussion (0)