SlideShare a Scribd company logo
CSE 136 Lecture 3 Part 1
   Introduction to C# language
   Memory Management
   Static vs non-static
   Properties
   Inheritance
   Modifiers (public, private, protected, etc)
   Namespace and Assembly (dll, exe)
Overview
C# Simple Program
C# keywords   Similar to Java
C# Pre-defined types
C# type values range
Stack Memory
Heap Memory
Value Type vs Reference Type
Value Types on Stack
Class Type
Class Type and Heap
Boxing
Unboxing




  Why box/unbox?
  Pass variables to method as reference
Value Parameter
Reference Parameter   box/unbox concept
Out Parameter
Static Field
Static Function Members
Const field vs Static field
Properties
Constructor




              Same method name
              Different param types
Static Constructor
Destructor
Inheritance - Concept




               Object re-use
Inheritance - Casting
Inheritance - virtual & override
Inheritance - Class Object
Constructor and inheritance
Modifier   Provide code security




                                   Assembly: Dll, Exe
                                   (Output of VS project)
Modifier and inheritance
Assembly and namespace
   Namespace is a collection of names wherein
    each name is unique
     ex: names CSE136.students
     ex: names CSE136.notes

   Assembly is an output unit (dll, exe).
     An  assembly can contain multiple namespaces
     ex: CSE136.dll
Review question
   How many bits is type int
   Does stack store type struct
   Where is type class data stored (stack or heap)?
   Where is static class data stored?
   Is string a value type?
   Difference between ref and out?
   Difference between static and const?
   Difference between public and protected?
   Difference between override and overload?
Break
CSE 136 - Lecture 3 Part 2
   Abstract Class
   Interfaces
   Generics
   Collections
   Enumeration
Abstract Class
Sealed
   The opposite of
    abstract class
   Instantiated as a
    stand-alone class
   Cannot derive from a
    sealed class
Interface 1
              Similar to abstract class
              without the method
              implementation
Interface 2
Interface 3 - Polymorphism
                        Multiple forms
                        (Method overriding)
Interface 4 - Polymorphism
                  Animal takes
                  on multiple forms



              ILiveBirth takes
              on multiple forms
Generics 1
Generics 2
Generic 3
Generic 4

Creating Variables and Instances

 Using a constructed type to create a reference and an instance
Generic 5
Two constructed classes created from a generic class
Generic 6
Collections 1
Using List to store string data
Collections 2

 List can also be used as a list of int
Collections 3
      Using Stack of string
Dictionary
Collections 4   - Another generic collection type
Enumeration 1   Iterator Pattern (Design Pattern)
Enumeration 2 - IEnumerator interface
Enumeration 3 - interface
Review question
   Difference between abstract class and
    interface?
   Difference between inheritance and
    polymorphism?
   What is type safe?
   Is generic type safe?
   Difference between enumerable and
    enumerator?
Your assignment
   Finish your DB design and stored procedures
    based on your UML diagram
   Demo to TA by Thursday end of class (25%
    late penalty will apply for late turn-ins)
References
   .NET : Architecting Applications for the
    Enterprise
   C# Illustrated

More Related Content

PPTX
Oracle Sql Developer Data Modeler 3 3 new features
PPTX
L04 base patterns
PPTX
L03 Design Patterns
PPTX
Database Programming Techniques
PDF
Learn Entity Framework in a day with Code First, Model First and Database First
PPTX
Getting started with entity framework
ODP
Software Patterns
PDF
The Epsilon Pattern Language
Oracle Sql Developer Data Modeler 3 3 new features
L04 base patterns
L03 Design Patterns
Database Programming Techniques
Learn Entity Framework in a day with Code First, Model First and Database First
Getting started with entity framework
Software Patterns
The Epsilon Pattern Language

What's hot (20)

PPTX
.NET Attributes and Reflection - What a Developer Needs to Know...
PPTX
L09 The Behavioral Problem
PPTX
Entity framework
PPTX
Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...
PPTX
L11 Application Architecture
PDF
Tcs Technical Question
PPT
Three Software Architecture Styles
PPTX
PPTX
Introducing Entity Framework 4.0
PPT
Composite Design Pattern
PDF
Domains - Don't leave your data model without them
PPT
ADO.NET Entity Framework
PPT
Composite pattern
PPTX
Entity Framework: Code First and Magic Unicorns
PDF
N-Tier, Layered Design, SOA
PPTX
Entity Framework Overview
PPTX
Entity Framework v2 Best Practices
PPT
Introduction of Oracle
PDF
Advanced Excel
PPT
Structural patterns
.NET Attributes and Reflection - What a Developer Needs to Know...
L09 The Behavioral Problem
Entity framework
Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...
L11 Application Architecture
Tcs Technical Question
Three Software Architecture Styles
Introducing Entity Framework 4.0
Composite Design Pattern
Domains - Don't leave your data model without them
ADO.NET Entity Framework
Composite pattern
Entity Framework: Code First and Magic Unicorns
N-Tier, Layered Design, SOA
Entity Framework Overview
Entity Framework v2 Best Practices
Introduction of Oracle
Advanced Excel
Structural patterns
Ad

Viewers also liked (6)

PDF
C# features I wish knew when I begun my career after University
PPSX
C# - Part 1
PPTX
Static keyword ppt
PPT
C#.NET
PPT
C# basics
PPSX
Introduction to .net framework
C# features I wish knew when I begun my career after University
C# - Part 1
Static keyword ppt
C#.NET
C# basics
Introduction to .net framework
Ad

Similar to Day3 (20)

PDF
Introduction to c#
PDF
Introduction To Csharp
PPT
Introduction to csharp
PPT
Introduction to csharp
PPT
Introduction to csharp
DOC
PPT
03 oo with-c-sharp
PPT
CSharp_03_ClassesStructs_and_introduction
PDF
C# quick ref (bruce 2016)
PPT
Introduction-to-Csharpppppppppppppppp.ppt
PPT
Advanced c#
PPTX
PPT
Object Oriented Programming In .Net
PPTX
CSharp presentation and software developement
PPT
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...
PPT
Introduction-to-Csharp.ppt
PPT
Introduction-to-Csharp programacion orientada a objetos
PPT
Introduction-to-Csharp.ppt
PPT
Introduction to-csharp
PPT
IntroToCSharpcode.ppt
Introduction to c#
Introduction To Csharp
Introduction to csharp
Introduction to csharp
Introduction to csharp
03 oo with-c-sharp
CSharp_03_ClassesStructs_and_introduction
C# quick ref (bruce 2016)
Introduction-to-Csharpppppppppppppppp.ppt
Advanced c#
Object Oriented Programming In .Net
CSharp presentation and software developement
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...
Introduction-to-Csharp.ppt
Introduction-to-Csharp programacion orientada a objetos
Introduction-to-Csharp.ppt
Introduction to-csharp
IntroToCSharpcode.ppt

More from madamewoolf (7)

PPTX
PPTX
PPTX
PPTX
PPTX
PPTX
PPTX

Recently uploaded (20)

PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
Pre independence Education in Inndia.pdf
PPTX
Cell Structure & Organelles in detailed.
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Cell Types and Its function , kingdom of life
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Classroom Observation Tools for Teachers
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Basic Mud Logging Guide for educational purpose
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Pre independence Education in Inndia.pdf
Cell Structure & Organelles in detailed.
Final Presentation General Medicine 03-08-2024.pptx
VCE English Exam - Section C Student Revision Booklet
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Renaissance Architecture: A Journey from Faith to Humanism
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Cell Types and Its function , kingdom of life
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
O7-L3 Supply Chain Operations - ICLT Program
Classroom Observation Tools for Teachers
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
Microbial diseases, their pathogenesis and prophylaxis
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Basic Mud Logging Guide for educational purpose
STATICS OF THE RIGID BODIES Hibbelers.pdf

Day3