Ebook – Rob Miles C# Yellow Book 2010 [PDF]

The C# Book is used by the Department of Computer Science in the University of Hullas the basis of the First Year programming course.

[…]In this book I’m going to give you a smattering of the C# programming language. If you have programmed before I’d be grateful if you’d still read the text. It is worth it just for the jokes and you may actually learn something.”[…]

Contents

Introduction
Welcome ............................................................................................................................. 5
Reading the notes ................................................................................................................ 5
Getting a copy of the notes ................................................................................................. 5
1 Computers and Programs
1.1 Computers ............................................................................................................ 6
1.2 Programs and Programming ................................................................................. 8
1.3 Programming Languages .................................................................................... 13
1.4 C# ....................................................................................................................... 14
2 Simple Data Processing
2.1 A First C# Program ............................................................................................ 18
2.2 Manipulating Data .............................................................................................. 26
2.3 Writing a Program .............................................................................................. 37
3 Creating Programs
3.1 Methods .............................................................................................................. 52
3.2 Variables and Scope ........................................................................................... 58
3.3 Arrays ................................................................................................................. 61
3.4 Exceptions and Errors......................................................................................... 65
3.5 The Switch Construction .................................................................................... 68
3.6 Using Files .......................................................................................................... 71
4 Creating Solutions
4.1 Our Case Study: Friendly Bank .......................................................................... 76
4.2 Enumerated Types .............................................................................................. 76
4.3 Structures ............................................................................................................ 79
4.4 Objects, Structures and References .................................................................... 82
4.5 Designing With Objects ..................................................................................... 89
4.6 Static Items ......................................................................................................... 94
4.7 The Construction of Objects ............................................................................... 98
4.8 From Object to Component .............................................................................. 104
4.9 Inheritance ........................................................................................................ 109
4.10 Object Etiquette ................................................................................................ 119
4.11 The power of strings and chars ......................................................................... 124
4.12 Properties .......................................................................................................... 126
4.13 Building a Bank ................................................................................................ 129
5 Advanced Programming
5.1 Generics and Collections .................................................................................. 134
5.2 Storing Business Objects .................................................................................. 138
5.3 Business Objects and Editing ........................................................................... 148
5.4 A Graphical User Interface ............................................................................... 153
5.5 Using Delegates ................................................................................................ 162
5.6 Threads and Threading ..................................................................................... 163
ii
5.7 Structured Error Handling ................................................................................ 171
5.8 Program Organisation ....................................................................................... 174
5.9 Debugging ........................................................................................................ 180
5.10 The End? .......................................................................................................... 183
6 Glossary of Terms

© Rob Miles 2011 Department of Computer Science, The University of Hull.
iii
All rights reserved. No reproduction, copy or transmission of this publication may be made without written permission. The author can be contacted at:
The Department of Computer Science,
Robert Blackburn Building The University of Hull,
Cottingham Road
HULL
HU6 7RX
UK
Department: www.dcs.hull.ac.uk
Email: rob@robmiles.com
Blog: www.robmiles.com
If you find a mistake in the text please report the error to foundamistake@robmiles.com and I will take a look.

Download (2.76 MB)

http://www.csharpcourse.com/

Gửi phản hồi

Mời bạn điền thông tin vào ô dưới đây hoặc kích vào một biểu tượng để đăng nhập:

WordPress.com Logo

Bạn đang bình luận bằng tài khoản WordPress.com Log Out / Thay đổi )

Twitter picture

Bạn đang bình luận bằng tài khoản Twitter Log Out / Thay đổi )

Facebook photo

Bạn đang bình luận bằng tài khoản Facebook Log Out / Thay đổi )

Google+ photo

Bạn đang bình luận bằng tài khoản Google+ Log Out / Thay đổi )

Connecting to %s