Start learning today, and be successful in your academic & professional career. Start Today!

John Snape

John Snape

Working with Strings

Slide Duration:

Table of Contents

Section 1: Introduction
Introduction Hello World

15m 5s

Declaring Variables

47m 26s

Accepting Input

13m 17s

Operators, Expressions and Statements

40m 8s

Program Flow Control

31m 44s

Iterations & Looping

24m 43s

Working with Strings

53m 6s

Formatting Strings for Output

16m 24s

Helper Methods

28m 40s

Enumerations & Structures

8m 39s

Commenting & Documenting Code

8m 48s

Arrays, Stacks, Queues & Dictionaries

41m 29s

Generic Lists & Collections

14m 24s

Variable Scope

10m 38s

Reading & Writing Files

25m 10s

Dates & Times

12m 22s

Random Numbers

5m 29s

Handling Exceptions

14m 45s

Environment Variables

8m 21s

Command Line Arguments

10m 43s

The CD Inventory Program So Far

34m 16s

Section 2: Object Oriented Programming
Introduction to Object Oriented Programming

1h 2m 20s

Understanding & Creating Classes

26m 6s

Understanding Interfaces & Abstract Classes

20m 12s

Static vs. Instance Members

16m 24s

Understanding Inheritance

32m 59s

Understanding Polymorphism

14m 58s

Understanding Delegates


Reading & Understanding Code

35m 49s

Creating a Data Type

29m 21s

Unified Modeling Language & Class Diagrams

23m 5s

The CD Inventory Program Upgraded with Classes

20m 33s

Section 3: GUI Programming
Introduction to GUI Programming

39m 19s

All About Forms

40m 7s

Handling Form Events

15m 22s

Informational Controls

27m 44s

Command Controls

36m 23s

Grouping Controls

26m 44s

Text Editing Controls

25m 7s

List Selection Controls

37m 45s

Setting Options Controls

21m 20s

Dialog Controls

22m 21s

Graphic Display Controls

35m 37s

Date Setting Controls

15m 53s

Other Controls

17m 33s

Using the Clipboard

7m 28s

Sending Email

25m 16s

Some Sample Programs

38m 31s

Our CD Inventory Program Upgraded with Forms

15m 16s

Section 4: Databases
Introduction to Databases

34m 7s

SQL Server Management Studio & Northwind Database

8m 11s

SELECT Statement

31m 24s

UPDATE & DELETE Statements

16m 56s

INSERT Statement

11m 48s

Creating a Database from Scratch

44m 54s

Querying Lists with LINQ

20m 42s

Using Databound Controls

14m 22s

Our CD Inventory Program Upgraded with a Database

10m 50s

Section 5: Conclusion
Where to Go from Here

19m 48s

This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of C#
  • Discussion

  • Study Guides

  • Table of Contents

Lecture Comments (4)

1 answer

Last reply by: John Snape
Thu Apr 24, 2014 3:15 AM

Post by Timothy Davis on April 23, 2014

Hi Professor Snape, I am enjoying the videos so far. Some of what you are teaching I already know because I am a Computer Science major, and  a lot  I dont know. I am working on a project for school, and it requires me to parse a line to look for information, and then use that information. Is there a method to search a string for x amount of characters, and then do something with a word located at a certain position in that string?

1 answer

Last reply by: John Snape
Fri Apr 18, 2014 11:04 PM

Post by Thuy Nguyen on April 18, 2014

Hi Prof Snape,

For the String.Join method, what is the 0, 4 when you wrote

String.Join("|", 0, 4)?

Working with Strings

  • Strings are immutable. Once they are created, if they are modified, the previous version is thrown away, and a new version is created.
  • To join strings, use +
  • String.Compare() is used to compare strings
  • .Insert and .Remove, .ToUpper and .ToLower, and .Split and .Join are just a few of the ways to deal with strings
  • A few more helpful, self-explanatory, functions:
    • .StartsWith and .EndsWith
    • .SubString
    • .PadLeft and .PadRight
    • .IndexOf and .IndexOfAny
    • .LastIndexOf and .LastIndexOfAny
  • Use the StringBuilder class if your strings will be modified multiple times
  • Using StringBuilder reduces memory usage
  • Some StringBuilder functions:
    • .Append
    • .Insert
    • .Remove
    • .Replace

    Please sign in to participate in this lecture discussion.

    Resetting Your Password?

    Start Learning Now

    Our free lessons will get you started (Adobe Flash® required).
    Get immediate access to our entire library.

    Membership Overview

    • Available 24/7. Unlimited Access to Our Entire Library.
    • Search and jump to exactly what you want to learn.
    • *Ask questions and get answers from the community and our teachers!
    • Practice questions with step-by-step solutions.
    • Download lecture slides for taking notes.
    • Track your course viewing progress.
    • Accessible anytime, anywhere with our Android and iOS apps.