Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
10Activity
0 of .
Results for:
No results containing your search query
P. 1
OOP_With_C#

OOP_With_C#

Ratings: (0)|Views: 85|Likes:
Published by api-3748960

More info:

Published by: api-3748960 on Oct 15, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

05/09/2014

pdf

text

original

Description: This document is a tutorial in a series of tutorials for programmers
learning about the .NET Framework development environment. What you will learn is
what C# is, as well as how to be a successful object oriented programmer with C#.

Requirements: You should be familiar with at least one programming language, such as
C++, Pascal, PERL, Java or Visual Basic. You should have some comfort with object
oriented concepts such as instantiating and using objects. You should be comfortable
with general computer science concepts. To do the exercises and run the examples you
need a PC running Windows with the .NET Framework installed.

Table of Contents

Table of Contents....................................................................................................1 Figures and Exercises............................................................................................3 1 Writing Object Oriented Software with C#.......................................................4 2 Object Oriented Concepts (A Refresher)........................................................4

2.1
Types and Instances................................................................................5
2.2
Type Derivation........................................................................................6
2.3
References to Instances..........................................................................7
2.4
Polymorphism...........................................................................................8
2.5
Members and Basic Accessibility.............................................................8
3 Designing Types..............................................................................................9
3.1
Fields......................................................................................................10
3.2
Methods..................................................................................................11
3.3
Properties...............................................................................................12
3.4
Constructors...........................................................................................13
3.5
Type Constructors..................................................................................14
3.6
Accessibility............................................................................................14
3.7
Derivation...............................................................................................15
3.8
Polymorphism.........................................................................................16
4 Event Handling..............................................................................................18
4.1
Handling Events.....................................................................................18
4.2
Defining Events......................................................................................19
4.3

Callback Methods...................................................................................20 5 Interfaces.......................................................................................................21 6 Operator Overloading and Type Conversion.................................................22

6.1
Operator Overloading.............................................................................22
6.2
Casting Operators (type converters)......................................................23
7 OOP in Practice.............................................................................................24
Figures

Figure 2 - 1 Types and Instances................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . .6 Figure 2 -2 Derivation.............................................................................................7 Figure 3 -1 Point.cs Property Example.................................................................12 Figure 3 - 2 Instance Constructors................................................. . . . . . . . . . . . . . . . . . . . . . . .13 Figure 3 -3 Accessibility Modifiers........................................................................15 Figure 3 - 4 Derived Type......................................................................................15 Figure 3 -5 Polymorphism.cs................................................................................17 Figure 4 - 1 EventHand.cs.....................................................................................18 Figure 4 -2 EventInt.cs..........................................................................................19 Figure 4 -3 EventInt consumer.............................................................................20 Figure 4 - 4 Delegates.cs ..................................................................................... . .20 Figure 5 - 1 Sortable.cs............................................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21 Figure 6 - 1 Overloading.cs...................................................................................22 Figure 6 - 2 Type Converters.................................................................. . . . . . . . . . . . . . . .23

Activity (10)

You've already reviewed this. Edit your review.
1 hundred reads
krishna liked this
sharique liked this
nitinbabariya liked this
funfrom83 liked this
oo77 liked this
kannanmrg liked this
vivekminhas liked this
truongtuan97 liked this
MuhammadOmair liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->