SlideShare a Scribd company logo
1 of 21
Q&D Overview C# fundamentals
Types Variables Instantiëren Signature Scope Basis concepten
Wat zijn types? Types zijn het type variabele die je declareert Welke vormen van types heb je? Enum types Class types Value types String Int Double ... ... Types
Wat zijn variables? Stukjes geheugen waarin een referentie of data kan geplaatst worden Referenties Een referentie variable is een geheugenadres dat verwijst naar een blok code in het geheugen (Naar een object met properties en methods) Value types Een value type variabele is een bepaalde hoeveelheid geheugen voor het bewaren van data (string, int, …) Variables
Wat is instantiëren? Het aanmaken van een object op basis van een bepaalde klasse (object blueprint) Voorbeeld: Button myButton; //Hier maak je de variabele aan myButton = new Button(); //Hier instantieer je Instantiëren
Wat is een signature? De signature is de beschrijving van een method. Uit wat bestaat een signature? De return type void, int, string, ... De naam De parameters (int para1, string para2) Signature
Wat is de scope? De scope is het blok waarin de variabelen kunnen aangesproken worden. Hoe definieer je een scope? Je definieert deze door { & } Scope
Namespace definition	 Delegate (partial) Classes or Structs Constants Variable definitions Constructors Methods Properties Interfaces Signatures Enum Names & values Doorlopen van de code structuur
Wat is een class? De beschrijving waarop objecten zijn gebaseerd (The object blueprint) Wat zijn properties De eigenschappen die het object zal hebben Wat zijn de methods De functies die het object zal kunnen uitvoeren Wat is de constructor? De initialisatie code die wordt uitgevoerd wanneer het object wordt aangemaakt Classes
Wat is een Enum? Een enum beschrijft een reeks van constanten Elke constante heeft een naam en een (standaard) value (altijd numeriek) Gebruik is altijd aan te raden in... Opsommingen van vaste waardes (bv Alfabet) Waarom? Switch case Status (Rolbeschrijvingen) Vb. Gebruiker heeft rol “Administrator” Enums
public enum Status {         Administrator,         Gebruiker } public class Persoon     {         public Status MyStatus { get; set; }         public string Name { get; set; }         public Persoon()         {             MyStatus = Status.Gebruiker;             Name = "Onbekend";         }     } Enum Voorbeeld
Abstractie Encapsulatie Inheritance Polymorphisme Principes van OOP
Het vormen van tussenlagen waarop verder gebouwd kan worden Hoe past OOP abstractie toe? Inheritance Polymorphisme Wat is abstractie?
Het beveiligen & verbergen van functionaliteiten en data Hoe past OOP dit toe? Private, public, protected Wat is encapsulatie?
Hergebruik van code door deze te laten overerven van klasse naar klasse Wat erft over? Constructor Methods Properties Een eigenschap Mogelijk een samenstelling van attributen Sommige properties zijn gekoppeld aan een attribuut Attributen (Datamembers) Wat is Inheritance?
Vanuit een lager abstractie niveau (vanuit een interface of een parent) functies oproepen. Hoe stel je dit voor? > Denk altijd met “foreach”, en hoe een foreach door een list (met gemeenschappelijke basis) reageert op verschillende soorten objecten met dezelfde functies Denk aan de content property van WPF contentcontrols Wat is polymorphisme?
Interfaces Static keyword Virtual/Override/New methods Abstract keyword Geavanceerdere concepten
Wat is een interface? Een interface beschrijft het gedrag van klasses Het is een contract tussen verschillende klasses Een interface bepaalt enkel wat gemeenschappelijk is tussen verschillende klasses Een interface heeft feitelijk geen inhoud buiten method signatures. Interface namen beginnen in .NET met een I Waarvoor gebruik je interfaces? Polymorphisme Interfaces
Wat is een static variabele? Een variabele die je maar één keer hoeft toe te wijzen en dus volledig onafhankelijk werkt van de objecten van die klasses. Staat één keer in het geheugen van de klasse Wat is een static method? Een method waar je geen object voor hoeft te instantiëren Wat is een static class? Een class met alleen maar static methods Een class die je niet kan instantiëren. Static
Wat is een virtual method? Om een method aan te passen in derived classes moet je deze aangeven met het keyword virtual in de parent class Wat is een overriden method? Een method die je aanpast in een derived class Wat is een new method? Een method die bij enkel bij rechtstreeks kan opgeroepen worden en niet door een polymorph Virtual/Override/New methods
Wat is een abstract class? Een class die je niet kan instantiëren en enkel bedoeld is om van te inheriten. (Bv een personeelsbestand met bedienden en arbeiders die beiden zijn afgeleid van “Persoon”) Wat is een abstract method? Een method die een override MOET hebben in een derived class Wordt zonder content gedefinieerd Abstract

More Related Content

Featured

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 

Featured (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

NL - Q&D Overview programming fundamentals C#

  • 1. Q&D Overview C# fundamentals
  • 2. Types Variables Instantiëren Signature Scope Basis concepten
  • 3. Wat zijn types? Types zijn het type variabele die je declareert Welke vormen van types heb je? Enum types Class types Value types String Int Double ... ... Types
  • 4. Wat zijn variables? Stukjes geheugen waarin een referentie of data kan geplaatst worden Referenties Een referentie variable is een geheugenadres dat verwijst naar een blok code in het geheugen (Naar een object met properties en methods) Value types Een value type variabele is een bepaalde hoeveelheid geheugen voor het bewaren van data (string, int, …) Variables
  • 5. Wat is instantiëren? Het aanmaken van een object op basis van een bepaalde klasse (object blueprint) Voorbeeld: Button myButton; //Hier maak je de variabele aan myButton = new Button(); //Hier instantieer je Instantiëren
  • 6. Wat is een signature? De signature is de beschrijving van een method. Uit wat bestaat een signature? De return type void, int, string, ... De naam De parameters (int para1, string para2) Signature
  • 7. Wat is de scope? De scope is het blok waarin de variabelen kunnen aangesproken worden. Hoe definieer je een scope? Je definieert deze door { & } Scope
  • 8. Namespace definition Delegate (partial) Classes or Structs Constants Variable definitions Constructors Methods Properties Interfaces Signatures Enum Names & values Doorlopen van de code structuur
  • 9. Wat is een class? De beschrijving waarop objecten zijn gebaseerd (The object blueprint) Wat zijn properties De eigenschappen die het object zal hebben Wat zijn de methods De functies die het object zal kunnen uitvoeren Wat is de constructor? De initialisatie code die wordt uitgevoerd wanneer het object wordt aangemaakt Classes
  • 10. Wat is een Enum? Een enum beschrijft een reeks van constanten Elke constante heeft een naam en een (standaard) value (altijd numeriek) Gebruik is altijd aan te raden in... Opsommingen van vaste waardes (bv Alfabet) Waarom? Switch case Status (Rolbeschrijvingen) Vb. Gebruiker heeft rol “Administrator” Enums
  • 11. public enum Status { Administrator, Gebruiker } public class Persoon { public Status MyStatus { get; set; } public string Name { get; set; } public Persoon() { MyStatus = Status.Gebruiker; Name = "Onbekend"; } } Enum Voorbeeld
  • 12. Abstractie Encapsulatie Inheritance Polymorphisme Principes van OOP
  • 13. Het vormen van tussenlagen waarop verder gebouwd kan worden Hoe past OOP abstractie toe? Inheritance Polymorphisme Wat is abstractie?
  • 14. Het beveiligen & verbergen van functionaliteiten en data Hoe past OOP dit toe? Private, public, protected Wat is encapsulatie?
  • 15. Hergebruik van code door deze te laten overerven van klasse naar klasse Wat erft over? Constructor Methods Properties Een eigenschap Mogelijk een samenstelling van attributen Sommige properties zijn gekoppeld aan een attribuut Attributen (Datamembers) Wat is Inheritance?
  • 16. Vanuit een lager abstractie niveau (vanuit een interface of een parent) functies oproepen. Hoe stel je dit voor? > Denk altijd met “foreach”, en hoe een foreach door een list (met gemeenschappelijke basis) reageert op verschillende soorten objecten met dezelfde functies Denk aan de content property van WPF contentcontrols Wat is polymorphisme?
  • 17. Interfaces Static keyword Virtual/Override/New methods Abstract keyword Geavanceerdere concepten
  • 18. Wat is een interface? Een interface beschrijft het gedrag van klasses Het is een contract tussen verschillende klasses Een interface bepaalt enkel wat gemeenschappelijk is tussen verschillende klasses Een interface heeft feitelijk geen inhoud buiten method signatures. Interface namen beginnen in .NET met een I Waarvoor gebruik je interfaces? Polymorphisme Interfaces
  • 19. Wat is een static variabele? Een variabele die je maar één keer hoeft toe te wijzen en dus volledig onafhankelijk werkt van de objecten van die klasses. Staat één keer in het geheugen van de klasse Wat is een static method? Een method waar je geen object voor hoeft te instantiëren Wat is een static class? Een class met alleen maar static methods Een class die je niet kan instantiëren. Static
  • 20. Wat is een virtual method? Om een method aan te passen in derived classes moet je deze aangeven met het keyword virtual in de parent class Wat is een overriden method? Een method die je aanpast in een derived class Wat is een new method? Een method die bij enkel bij rechtstreeks kan opgeroepen worden en niet door een polymorph Virtual/Override/New methods
  • 21. Wat is een abstract class? Een class die je niet kan instantiëren en enkel bedoeld is om van te inheriten. (Bv een personeelsbestand met bedienden en arbeiders die beiden zijn afgeleid van “Persoon”) Wat is een abstract method? Een method die een override MOET hebben in een derived class Wordt zonder content gedefinieerd Abstract