You are previewing Learning Object-Oriented Programming in C# 5.0.
O'Reilly logo
Learning Object-Oriented Programming in C# 5.0

Book Description

With a solid focus on hands-on projects, LEARNING OBJECT-ORIENTED PROGRAMMING IN C# 5.0 is a comprehensive guide to all the most valuable features of C# 5.0. The book covers all the fundamentals, beginning with easy examples and gradually delving deeper into complex topics, providing the essential information you'll need to learn Visual C#. With the expert guidance of programmer, author, and teacher B.M. Harwani, you will explore the principles and benefits of object-oriented programming, in-depth OOP fundamentals, creating and using advanced class features such as generics and operator overloading, Web Services, LINQ, multiple threading, security features, and much more. In addition, you'll find complete coverage of .NET features, including assemblies, memory management, Networking, XML, and ADO.NET. A complete instructional text for learning C# 5.0 and a comprehensive reference, LEARNING OBJECT-ORIENTED PROGRAMMING IN C# 5.0 is your go-to source for mastering C# 5.0.

Table of Contents

  1. Title Page
  2. Copyright Page
  3. Dedication
  4. ACKNOWLEDGMENTS
  5. ABOUT THE AUTHOR
  6. CONTENTS
  7. INTRODUCTION
  8. CHAPTER 1 THE .NET FRAMEWORK
    1. C# INTRODUCTION
    2. .NET FRAMEWORK STRUCTURE
    3. ASSEMBLY USE
    4. VISUAL STUDIO IDE OVERVIEW
    5. VISUAL STUDIO INSTALLATION
    6. RUNNING A C# PROGRAM
    7. LINE-BY-LINE EXPLANATION OF CODE
    8. MODIFICATION OF THE MAIN( ) METHOD
    9. SUMMARY
  9. CHAPTER 2 DATA TYPES
    1. IDENTIFIERS AND KEYWORDS
    2. VARIABLES
    3. CONSTANTS
    4. PREDEFINED DATA TYPES
    5. PREDEFINED VALUE TYPES
    6. NULLABLE TYPES
    7. PREDEFINED REFERENCE TYPES
    8. IMPLICITLY TYPED VARIABLES
    9. REFERENCE TYPES
    10. BOXING
    11. UNBOXING
    12. STREAMS
    13. CONSOLE I/O
    14. COMMENT USE
    15. WINDOWS FORM APPLICATION
    16. SUMMARY
  10. CHAPTER 3 OPERATORS AND EXPRESSIONS
    1. OPERATORS
    2. PRECEDENCE AND ASSOCIATIVITY
    3. ARITHMETIC OPERATORS
    4. RELATIONAL OPERATORS
    5. EQUALITY OPERATORS
    6. LOGICAL BOOLEAN OPERATORS
    7. LOGICAL BITWISE OPERATORS
    8. SHIFT OPERATORS
    9. ASSIGNMENT OPERATORS
    10. TERNARY OPERATOR (CONDITIONAL OPERATOR)
    11. THE MATH CLASS
    12. SUMMARY
  11. CHAPTER 4 DECISION-MAKING AND LOOPING
    1. CONDITIONAL STATEMENTS
    2. THE CONDITIONAL OPERATOR
    3. LOOPS
    4. THE CONTINUE STATEMENT
    5. THE GOTO STATEMENT
    6. ENUMERATION
    7. SUMMARY
  12. CHAPTER 5 ARRAYS AND STRINGS
    1. USING ARRAYS
    2. USING STRINGS
    3. PASSING COMMAND-LINE ARGUMENTS TO MAIN( )
    4. USING STRINGBUILDER
    5. USING ARRAYLIST
    6. SUMMARY
  13. CHAPTER 6 METHODS AND STRUCTURES
    1. METHODS
    2. OPTIONAL AND NAMED PARAMETERS
    3. C# PARAMETER MODIFIERS
    4. YOUR OWN TYPE: STRUCTURES
    5. NESTED STRUCTS
    6. DATE AND TIME STRUCTURE
    7. SUMMARY
  14. CHAPTER 7 CLASSES AND OBJECTS
    1. CLASS
    2. ENCAPSULATION
    3. USE OF PROPERTIES
    4. THE THIS KEYWORD
    5. CONSTRUCTORS
    6. GARBAGE COLLECTION
    7. STATIC CLASSES AND MEMBERS
    8. NAMESPACE
    9. INTERNAL MODIFIER
    10. SUMMARY
  15. CHAPTER 8 INHERITANCE AND POLYMORPHISM
    1. TYPES OF INHERITANCE
    2. METHOD OVERRIDING
    3. SEALED CLASS AND METHODS
    4. METHOD HIDING
    5. ABSTRACT CLASSES
    6. ABSTRACT PROPERTIES
    7. POLYMORPHISM
    8. SUMMARY
  16. CHAPTER 9 INTERFACES
    1. INVOKING INTERFACE MEMBERS AT THE OBJECT LEVEL
    2. IMPLEMENTING MULTIPLE INTERFACES
    3. HANDLING AMBIGUITY WHEN IMPLEMENTING MULTIPLE INTERFACES
    4. IMPLEMENTING AN INTERFACE EXPLICITLY
    5. VERIFYING INTERFACE IMPLEMENTATION
    6. IMPLEMENTING A MULTILEVEL INTERFACE
    7. IMPLEMENTING INTERFACE PROPERTIES
    8. UNDERSTANDING HOW A STRUCTURE IMPLEMENTS AN INTERFACE
    9. PASSING AN INTERFACE AS A PARAMETER
    10. RETURNING AN INTERFACE
    11. SUMMARY
  17. CHAPTER 10 OPERATOR OVERLOADING
    1. BINARY OPERATOR OVERLOADING
    2. UNARY OPERATOR OVERLOADING
    3. TRUE AND FALSE OPERATOR OVERLOADING
    4. COMPARISON OPERATORS OVERLOADING
    5. CONVERSION OPERATORS OVERLOADING
    6. SUMMARY
  18. CHAPTER 11 DELEGATES AND EVENTS
    1. DELEGATES INTRODUCTION
    2. MULTICAST DELEGATES
    3. COVARIANCE AND CONTRAVARIANCE
    4. GENERIC DELEGATE TYPES
    5. ANONYMOUS METHOD
    6. DIFFERENCE BETWEEN DELEGATES AND INTERFACES
    7. EVENT HANDLING
    8. SUMMARY
  19. CHAPTER 12 GENERICS AND COLLECTIONS
    1. COLLECTIONS
    2. STANDARD INTERFACES
    3. IENUMERATORS
    4. HASHTABLE
    5. SORTEDLIST
    6. BITARRAY
    7. STACK
    8. QUEUE
    9. GENERICS
    10. GENERIC COLLECTIONS
    11. SORTEDSET
    12. LINKEDLIST<T>
    13. SUMMARY
  20. CHAPTER 13 MANAGING ERRORS AND EXCEPTIONS
    1. INTRODUCING ERRORS AND EXCEPTIONS
    2. USING MULTIPLE TRY BLOCKS
    3. USING MULTIPLE CATCH BLOCKS
    4. THROWING AN EXCEPTION
    5. NESTING TRY BLOCKS
    6. CREATING YOUR OWN EXCEPTION
    7. USING THE CHECKED/UNCHECKED OPERATOR
    8. SUMMARY
  21. CHAPTER 14 THREADS
    1. INTRODUCTION TO THREADS
    2. LIFE CYCLE OF A THREAD
    3. MULTITHREADING
    4. SUMMARY
  22. CHAPTER 15 STREAMS
    1. INTRODUCING STREAMS
    2. HANDLING FILES
    3. READING A FILE RANDOMLY
    4. READING AND WRITING PRIMITIVE TYPES IN BINARY FORMAT
    5. PERFORMING CHARACTER-BASED FILE I/O
    6. READING AN ENTIRE FILE
    7. HOLDING DATA TEMPORARILY USING MEMORYSTREAM
    8. MANAGING A DIRECTORY USING DIRECTORYINFO
    9. SUMMARY
  23. CHAPTER 16 ADO.NET
    1. EXAMINING THE MAJOR COMPONENTS OF ADO.NET
    2. CONNECTING OR CREATING A DATABASE
    3. ACCESSING DATA FROM THE DATABASE
    4. INSERTING ROWS IN A TABLE
    5. UPDATING A TABLE
    6. SUMMARY
  24. CHAPTER 17 LINQ QUERIES
    1. IMPLICITLY TYPED LOCAL VARIABLES
    2. OBJECT AND COLLECTION INITIALIZERS
    3. LAMBDA EXPRESSIONS
    4. EXTENSION METHODS
    5. ANONYMOUS TYPES
    6. LINQ CATEGORIES
    7. SUMMARY
  25. CHAPTER 18 WEB-BASED APPLICATION DEVELOPMENT IN .NET
    1. EXAMINING THE VISUAL STUDIO TOOLBOX
    2. BUILDING YOUR FIRST WEB APPLICATION
    3. USING THE CHECKBOX CONTROL
    4. USING THE RADIOBUTTON CONTROL
    5. USING THE LISTBOX CONTROL
    6. USING THE LINKBUTTON CONTROL
    7. USING THE HYPERLINK CONTROL
    8. USING THE IMAGEBUTTON CONTROL
    9. WORKING WITH WCF
    10. CREATING A CLIENT APPLICATION
    11. SUMMARY
  26. CHAPTER 19 .NET ASSEMBLIES
    1. USING ASSEMBLIES
    2. CREATING AND USING A SHARED ASSEMBLY
    3. SUMMARY
  27. INDEX