CS215: Introduction to .NET & C#

Fall, 2002

Announcements

10/02/02: The course is over! If you want to see me during the rest of the semester on a .NET issue, office hours are not valid anymore. So write me an e-mail and we can arrange the meeting...

09/03/02: Assignment 1 has been posted to the newsgroup. Check it out and bring your questions to tomorrow's lecture!

08/19/02: This course website has been deployed! If you have questions for the instructor concerning the course or interesting links to add to the bottom of this page, email kyotov@cs.cornell.edu.

Description

Introduction to the .NET development framework and the C# programming language, discussing some new and/or interesting features of both.

Objectives

In CS215 you be expected to learn the foundations of:

  • .NET application framework;
  • CLR (Common Language Runtime);
  • CTS (Common Type System);
  • C# Programming Language (mainly new features with respect to C++ and Java);

Organization

  • When: MWF, 12:20-13:10, 09/02/02 - 09/27/02
  • Add/Drop Deadline: 09/09/02
  • Instructor: Kamen Yotov
  • Consultants/Graders:
    • TBA
  • Office Hours:
    • Instructor: TR 15:00-16:00 (Rhodes 492)

Overview

The primary goal of this course will be to introduce the .NET development framework and discuss some interesting features of the C# programming language. Some of these features are already found in existing languages while others are unique to C#. Here is an abbreviated list:

  • CLR (Common Language Runtime) Features:
    • Garbage Collection;
    • ValueTypes and References;
    • Boxing & Unboxing;
    • Language Interoperability (C++ and others);
    • Unsafe Mode;
  • C# Language Features:
    • Statements:
      • foreach & Enumerators;
      • switch Extensions & Restrictions;
        • string cases;
    • Declarations:
      • Attributed Declarations;
      • Access Modifiers (internal);
      • ref and out Function Arguments;
      • Variable Number of Function Arguments;
      • Operator Overloading;
    • Types:
      • Delegates & Events;
        • add & remove Event Modifiers;
      • Properties & Indexers;
      • Multidimensional Arrays;
    • Expressions:
      • checked & unchecked contexts;
      • "is" and "as";
      • @ identifiers & string Literals;
      • Pointer Arithmetic & Object Casting and Pinning in Unsafe Mode;
    • Undocumented:
      • __arglist
      • __makeref
      • __refvalue
      • __reftype
    • Other:
      • Explicit Interface Implementation;
      • Interface Reimplementation;
      • Conditional Compilation (#...);
      • Generics (future);
  • Advanced Topics (as time permits):
    • ADO.NET
    • ASP.NET

Prerequisites

This is not going to be the next "Introduction to Programming" course. The material presented will heavily rely on previous knowledge about the Object-Oriented Programming model. This implies that you need to be familiar with another OO language like Java or C++. A good justification of this is a completed CS211 or equivalent.

Assignments& Grading

As this is a S/U course, to complete it successfully you need a "pass" on all of the four assigned homeworks (one each week). They will all consist of writing some C# programs and all the write-up will be inside the sources (as comments).

To successfully "pass" an assignment you need to demonstrate the required C# programs in person to the instructor during one of the office hours not later than the due date.

  • You can demonstrate your work as early as you want;
  • You can demonstrate your work as many times as you want;
  • You need to make a successful demonstration before the deadline. period.

You can discuss all homeworks with your classmates but the sources that you demonstrate should be your own work. This not only implies that you should have written them but also that you should understand them!

Homeworks will be handed out on Fridays (except for the first one) and will be due one week later. Here is the exact schedule:

No. Assigned: Due by:
1 09/02/02 09/06/02
2 09/06/02 09/13/02
3 09/13/02 09/20/02
4 09/20/02 09/27/02

If there is enough interest, a more elaborate "final" project might be an option for completing the class, provided that it covers all features in the homeworks. Also, there will be a lot of interesting optional projects for those that want more.

Lecture Notes

Slides from lectures will be posted here!

Review of Homework 1
Review of Homework 2

Development Environment

A good choice is the academic version of Visual Studio.NET, but it is not a requirement. If you choose to use it, distribution CDs will be available from the instructor.

The .NET framework SDK will generally be good enough. Another option, for those further interested, is the "Shared Spource" version of .NET codenamed Rotor. This will expose you to the internals of a fairly full (source code) implementation of the framework.

Links