Professional Documents
Culture Documents
C# language
ECMA standard originally developed by MSR not just Java + C++ many extensions
Introduce
.NET framework
Non-goals
Teach
you to program
should be very comfortable writing OO code we will not cover much if any basic programming
Introduce
not even teach you OO style (except wrt C#) expected to write all code in OO style
Give
S/U Details
come to lecture participate do three assignments will not be giving a detailed grade show me that you understand the concepts, and can write C# code must be completed by the end of the course
Administrative Details
Class
Prerequisites:
CS 211/212
Academic
Integrity
Do not submit work that is not your own minimum penalty: U in the course
Useful Tools
Visual
C#
Mono:
http://www.go-mono.com http://msdn.microsoft.com/net/sscli
Open Source impl for Linux: not quite at 2.0 Shared Source impl for Windows (through 2.0) Used to work on BSD / OS X, too
Rotor:
Useful Tools
Portable.NET:
http://www.dotgnu.org
CMS:
http://cms.csuglab.cornell.edu
Course
CSUGLab
You
MSDNAA access: let me know if you dont currently have it http://www.csuglab.cornell.edu/userinfo.html Visual Studio .NET 2005 should be installed there
Syllabus
Syllabus
C# constructs: 5 lectures Types, Delegates, Generics, Reflection, Iterators .NET Memory Management: 1 lecture Topics: 4 lectures C# 3.0, Threading, Security, MSIL, MSH
Quiz 1
Each
not for credit but for knowledge but I will collect them and see what you know
Todays
OO programming, mainly to do with Java If you dont know Java, but do have OO experience, its OK talk to me after if you have trouble
What is .NET?
A
What is .NET?
Web Services
Sharepoint ... ...
Enterprise Servers
SQL Server BizTalk ...
Runtime
Common Type System Common Language Runtime
.NET Framework
Operating System
From MSDN
For
example
From MSDN
For
example
Code that takes UInt32 in a public method UInt32 is not in the CLS
Can
Many
C#, C++, J#, Visual Basic even have Python (see IronPython)
Assemblies
Code
shared: well-known location, can be GAC strong names: use crypto for signatures
COM vs .NET
Historically,
support for interfaces and interaction given a GUID, lookup the type library dynamically instantiate class do RPC to make calls in many cases
Difficult
to get right
thus can write typesafe code server-side or client-side Sharepoint interactions can log in
Use
Windows PowerShell
New
instantiates arbitary .NET classes and accesses them Also can access COM objects
Allows
First C# Program
using System; namespace Test { int a = 137; class Hello { public static void Main(string[] args) { Console.WriteLine(Hello {0}, a); } } }
Constructions of Note
using
like import in Java: bring in namespaces disambiguation of names like Internet hierarchical names and Java naming like in Java single inheritance up to object
namespace
class
Constructions of Note
Console.Write(Line)
Test + a