¡GoConqr estrena diseño! Cuéntanos qué te parece.

Apuntes

C# Fundamentals

Peter Holcroft Inglés 1 página

Contenido del apunte (1)

Página 1

CLR - Common Language Runtime

Handles Memory, runs the code

FCL - Framework Class Library

A collection of libraries used to create programs. .Net is a FCL

BCL - Base Class Library

The Base Class Library (BCL) is literally that, the base. It contains basic, fundamental types like System.String and System.DateTime.

The Framework Class Library (FCL) is the wider library that contains the totality: ASP.NET, WinForms, the XML stack, ADO.NET and more. You could say that the FCL includes the BCL.

csc.exe = Command Source Compiler

MISL = MicroSoft Intermediate Language = CIL = Common Intermediate Language

Debugging Shortcuts:

F5 - Start

F10 - Step Over

F11 - Step Into

Ctrl + F5 - Stop

Class = Write a class to create a new type

Primitive Types - int, long, DateTime

Class Members Define:

1. State - the data you need to work with inside a class

2. Behaviour - Members that do work. e.g. Methods that do work with the values

Type Precision

float 7 digits

double 15 digits

Classes:

Define a type - Uses the types for variables and arguments

Create Objects - Invoke methods and save state

What you use to instantiate an object, What you use to type a variable

new - new invokes a constructor to create a new object (instantiates)

ctor - Code Snippet for constructor, tab twice

field = variable inside of a class

Reference Types

Classes are reference types

Variables point to objects (they don't hold the objects in their storage location)

Object Oriented Programming

An object is an instance of a class

A class is a blueprint or template from which objects are created.

An object is a physical entity, class is a logical entity

Classes usually have names that are nouns (people, place or names)

Methods usually have names that are verbs (describes an action or work)

Objects are nouns

Methods are verbs

Objects encapsulate functionality

Ctr + . = Automatically create method for you

Access Modifiers

Private - inside class

Public - anyone can see them

Statics

Methods or fields of a class can be static.

you can use statics without creating an instance of the class. (they are part of the template)

Be careful, statics can have negative effects (lookup)

Hold down alt to select 3 lines of text and you can type in front of them for the text to appear before them all.

TODO - Types and Assemblies

Información

Descripción
Apunte sobre C# Fundamentals, creado por Peter Holcroft el 16/04/2018.
Creado por
Peter Holcroft
Visitas
1
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?