Object-Oriented Programming in C#

Object-Oriented Programming in C# Courseware (4001)

Microsoft .NET is an advance in programming technology that greatly simplifies application development, both for traditional, proprietary applications and for the emerging paradigm of Web-based services. .NET 6 is a unified platform, for browser, cloud, desktop, IoT, and mobile apps. It is based on .NET Core, the package-based implementation that is cross-platform, running on Mac and Linux besides Windows. It completes the unification of the .NET platform begun with .NET 5.

Part of this technology is the new language from Microsoft, C#. This language combines the power of C++ and the ease of development of Visual Basic 6. It bears a striking resemblance to Java and improves on that language. C# has become the dominant language for building new applications on Microsoft platforms.

This thorough and comprehensive course is a practical introduction to programming in C#, utilizing the services provided by .NET. This course emphasizes the C# language. It is current to Visual Studio 2022, .NET 6 and C# 10. Important newer features such as dynamic data types, named and optional arguments, tuples, asynchronous programming keywords, nullable reference types, record types, and top-level statements are covered. Supplements provide a tutorial on Visual Studio 2022, an overview of LINQ, and coverage of unsafe code and pointers in C#.

This course is intended to be fully accessible to programmers who do not already have a strong background in object-oriented programming in C-like languages, such as C++ or Java. It is ideal, for example, for procedural programmers who desire to learn C#.

An important thrust of the course is to teach C# programming from an object-oriented perspective. It is often difficult for programmers trained originally in a procedural language to start “thinking in objects.” This course introduces object-oriented concepts early, and C# is developed in a way that leverages its object orientation. A case study is used to illustrate creating a complete system using C# and .NET. Besides supporting traditional object-oriented features, such as classes, inheritance, and polymorphism, C# introduces several additional features, such as properties, indexers, delegates, events, and interfaces that make C# a compelling language for developing object-oriented and component-based systems. This course provides thorough coverage of all these features.

C# as a language is elegant and powerful. But to utilize its capabilities fully, you need to have a good understanding of how it works with the .NET Framework. The course explores several important interactions between C# and the .NET Framework, and it includes an introduction to major classes for collections, delegates, and events. It includes a succinct introduction to creating GUI programs using Windows Forms. The course concludes with a chapter covering the newer features in the language.

Numerous programming examples and exercises are provided, including the case study. The student will receive a comprehensive set of materials, including course notes and all the programming examples.

Benefits

  • Acquire a working knowledge of C# programming
  • Learn how to implement programs using C# and classes from the .NET Framework
  • Gain an understanding of the object-oriented programming paradigm
  • Learn how to implement simple GUI programs using Windows Forms
  • Gain a working knowledge of important newer features in C#

Outline

  1. Introduction to .NET
    1. What is .NET?
    2. .NET Framework, .NET Core and .NET 6
    3. Application Models
    4. Managed Code
    5. Visual Studio 2022
    6. Console Programs and New Console Template
    7. GUI Programs
  2. First C# Programs
    1. Hello, World
    2. Namespaces
    3. Variables and Expressions
    4. Using C# as a Calculator
    5. Input/Output in C#
    6. .NET Class Library
  3. Data Types in C#
    1. Data Types
    2. Integer Types
    3. Floating Point Types
    4. Decimal Type
    5. Characters and Strings
    6. Boolean Type
    7. Conversions
    8. Nullable Types
  4. Operators and Expressions
    1. Operator Cardinality
    2. Arithmetic Operators
    3. Relational Operators
    4. Logical Operators
    5. Bitwise Operators
    6. Assignment Operators
    7. Expressions
    8. Checked and Unchecked
  5. Control Structures
    1. If Tests
    2. Loops
    3. Arrays
    4. Foreach
    5. More about Control Flow
    6. Switch
  6. Object-Oriented Programming
    1. Objects
    2. Classes
    3. Inheritance
    4. Polymorphism
    5. Object-Oriented Languages
    6. Components
  7. Classes
    1. Classes as Structured Data
    2. Methods
    3. Constructors and Initialization
    4. Static Fields and Methods
    5. Constant and Readonly
  8. More about Types
    1. Overview of Types in C#
    2. Value Types
    3. Boxing and Unboxing
    4. Reference Types
    5. Implicitly Typed Variables
  9. Methods, Properties and Operators
    1. Methods
    2. Parameter Passing
    3. Method Overloading
    4. Variable-Length Parameter Lists
    5. Properties
    6. Auto-Implemented Properties
    7. Operator Overloading
  10. Characters and Strings
    1. Characters
    2. Strings
    3. String Input
    4. String Methods
    5. StringBuilder Class
    6. Programming with Strings
  11. Arrays and Indexers
    1. Arrays
    2. System.Array
    3. Random Number Generation
    4. Jagged Arrays
    5. Rectangular Arrays
    6. Arrays as Collections
    7. Bank Case Study—Step 1
    8. Indexers
  12. Inheritance
    1. Single Inheritance
    2. Access Control
    3. Method Hiding
    4. Initialization
    5. Bank Case Study—Step 2
  13. Virtual Methods and Polymorphism
    1. Virtual Methods and Dynamic Binding
    2. Method Overriding
    3. Fragile Base Class Problem
    4. Polymorphism
    5. Abstract Classes
    6. Sealed Classes
    7. Heterogeneous Collections
    8. Bank Case Study—Step 3
  14. Formatting and Conversion
    1. ToString
    2. Format Strings
    3. String Formatting Methods
    4. Bank Case Study—Step 4
    5. Type Conversions
  15. Exceptions
    1. Exception Fundamentals
    2. Structured Exception Handling
    3. User-Defined Exception Classes
    4. Inner Exceptions
    5. Bank Case Study—Step 5
  16. Interfaces
    1. Interface Fundamentals
    2. Programming with Interfaces
    3. Using Interfaces at Runtime
    4. Bank Case Study—Step 6
    5. Resolving Ambiguities
  17. .NET Interfaces and Collections
    1. Collections
    2. Bank Case Study—Step 7
    3. IEnumerable and IEnumerator
    4. Copy Semantics and ICloneable
    5. Comparing Objects
    6. Generic Types
    7. Type-Safe Collections
    8. Object Initializers
    9. Collection Initializers
    10. Anonymous Types
    11. Bank Case Study—Step 8
  18. Delegates and Events
    1. Delegates
    2. Anonymous Methods
    3. Lambda Expressions
    4. Events
  19. Introduction to Windows Forms
    1. Creating Windows Applications Using Visual Studio 2019
    2. Partial Classes
    3. Buttons, Labels and Textboxes
    4. Handling Events
    5. Listbox Controls
  20. Newer Features in C#
    1. Dynamic Data Type
    2. Named and Optional Arguments
    3. Variance in Generic Interfaces
    4. Asynchronous Programming Keywords
    5. New Features in C# 6 and C# 7
    6. Nullable Reference Types
    7. Record Types
    8. Top-level Statements
  21. Appendix A. Learning Resources
    1. Supplement 1. Using Visual Studio 2022
      1. Signing into Visual Studio
      2. Overview of Visual Studio 2022
      3. Creating a Console Application
      4. Project Configurations
      5. Debugging
      6. Multiple-Project Solutions
    2. Supplement 2. Language Integrated Query (LINQ)
      1. What is LINQ?
      2. Basic Query Operators
      3. Filtering
      4. Ordering
      5. Aggregation
    3. Supplement 3. Unsafe Code and Pointers in C#
      1. Unsafe Code
      2. C# Pointer Type

Required Prerequisites

The student should have programming experience in a high-level language.

License

Length: 5 days | $200.00 per copy

LicenseRequest More InformationDownload Sample CopyRequest Trainer Evaluation Copy
What is Included?
  • Student Manual
  • Student Class Files
  • Extra Trainer Files
  • PowerPoint Presentation