Zebra0.com

csharp stringsC# Windows Forms Programming

C# Windows Forms Programming

Learn C# (C sharp) in FREE step-by-step lessons.

Strings in C#

There are many functions for working with strings.
For instance, you can extract just part of a string, tell if one string is embedded inside another string, and replace one string with another.

Print the lesson

Please study the material at each of the links below.

  1. Microsoft Reference Microsoft Reference: Strings and String methods

  2. Parse: Parse means to break a string up into significant parts, or to convert a string to a numeric type.

  3. String Functions: Examples of the most used string methods

  4. String Length: Length gives the number of ALL characters in the String

  5. String Substr: Substr extracts a portion of a string

  6. Names: Using String Functions: Split name into first and last

  7. Escape Sequence: \ and @ Escape Sequence: \ and @: Using the \ and @ with strings with special characters
    /csharp/videos/csharp-escape.mp4
  8. String is valid Social Security Number.: A valid Social Security number has 9 digits

  9. Regular Expressions: A regular expression is a way to determine if a string matches a pattern.

  10. Regular Expressions for a sentence: A sentence must have letters of the alphabet and end with . ? or !

  11. Regular Expression for Robot: R2D2, C3P0?: Regex robotregx= new Regex(@"([A-Z][0-9]){2}");

  12. Regular Expression Drill: Test your understanding

  13. Scramble Array Algorithm Scramble Array Algorithm: Easy algorithm to scramble (shuffle) an array
    /videos/scramble.mp4
  14. Anagram Demo: An anagram is simply the letters of the word scrambled

  15. Anagrams: Details for creating the form

  16. Cryptogram Demo: A cryptogram shuffles the alphabet to create a code

  17. Cryptogram Demo: A cryptogram shuffles the alphabet to create a code

  18. Comparing strings: Download the PDF file

Active Learning

Create a strong password from song.

GlossaryGlossary for strings lesson
Full Glossary