Skip to main content
Ctrl+K

Introduction to Computer Science in C# (02 May 2026)

  • Introduction to Computer Science in C#
  • Context
    • Motivation for This Book
    • Resources Online
    • Downloading and Reading Options
    • Computer Science, Broadly
    • Chapter Review Questions
  • C# Data and Operations
    • A Sample C# Program
    • Lab: Editing, Compiling, and Running with Xamarin Studio
    • Arithmetic
    • Variables and Assignment
    • Syntax Template Typography
    • Strings, Part I
    • Writing to the Console
    • C# Program Structure
    • Combining Input and Output
    • String Special Cases
    • Substitutions in Console.WriteLine
    • Value Types and Conversions
    • Learning to Solve Problems
    • Lab: Division Sentences
    • Chapter Review Questions
  • Defining Functions of your Own
    • A First Function Definition
    • Multiple Function Definitions
    • Function Parameters
    • Multiple Function Parameters
    • Returned Function Values
    • Two Roles: Writer and Consumer of Functions
    • Local Scope
    • Static Variables
    • Not using Return Values
    • Library Classes
    • Tracebacks
    • Static Function Summary
    • Chapter Review Questions
  • Basic String Operations
    • String Indexing
    • Some Instance Methods and the Length Property
    • A Creative Problem Solution
    • Lab: String Operations
    • Chapter Review Questions
  • Decisions
    • Conditions I
    • Simple if Statements
    • if-else Statements
    • More Conditional Expressions
    • Multiple Tests and if-else Statements
    • If-statement Pitfalls
    • Compound Boolean Expressions
    • Nested if Statements
    • Chapter Review Questions
  • While Loops
    • While-Statements
    • While-Statements with Sequences
    • Interactive while Loops
    • Short-Circuiting && and ||
    • While Examples
    • More String Methods
    • User Input: UI
    • Greatest Common Divisor
    • Do-While Loops
    • Number Guessing Game Lab
    • Chapter Review Questions
  • Foreach Loops
    • foreach Syntax
    • foreach Examples
    • Chapter Review Questions
  • For Loops
    • For-Statement Syntax
    • Examples With for Statements
    • Lab: Loops
    • Chapter Review Questions
  • Files, Paths, and Directories
    • Files As Streams
    • Writing Files
    • Reading Files
    • Path Strings
    • Directory Class
    • Command Line Execution
    • FIO Helper Class
    • Chapter Review Questions
  • Arrays
    • One Dimensional Arrays
    • Musical Scales and Arrays
    • Linear Searching
    • Sorting Algorithms
    • Binary Searching
    • Lab: Arrays
    • Lab: Performance
    • Multi-dimensional Arrays
    • Chapter Review Questions
  • Lists
    • List Syntax
    • .Net Library (API)
    • Chapter Review Questions
  • Dictionaries
    • Dictionary Syntax
    • Dictionary Efficiency
    • Dictionary Examples
    • Lab: File Data and Collections
    • Chapter Review Questions
  • Classes and Object-Oriented Programming
    • A First Example of Class Instances: Contact
    • Class Instance Examples
    • The Rational Class
    • Planning A Class Structure
    • Classes And Structs
    • Defining Operators (Optional)
    • Chapter Review Questions
  • Testing
  • Interfaces
    • Rationals Revisited
    • Csproject Revisited
    • Chapter Review Questions
  • Recursion
  • Data Structures
  • Appendix
    • Development Tools
    • Xamarin Studio
    • Command Line Introduction
    • Precedence of Operators
    • Homework: Grade Calculation
    • Homework: Grade Calculation from Individual Scores
    • Homework: Grade File
    • Homework: Book List
    • Group Project
    • Lab: Version Control
    • Mercurial and Teamwork
    • Acknowledgments
  • Repository
  • Open issue

Basic String Operations

Basic String Operations#

  • String Indexing
    • Indexing Exercise
  • Some Instance Methods and the Length Property
    • Summary of String Length and Some Instance Methods
  • A Creative Problem Solution
  • Lab: String Operations
    • Goals for this lab:
  • Chapter Review Questions

previous

Chapter Review Questions

next

String Indexing

By Andrew N. Harrington and George K. Thiruvathukal

© Copyright 2012-2021, Andrew N. Harrington and George Thiruvathukal.

Last updated on 02-May-2026 17:15:04.