Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Microsoft

Work with variable data in C# console applications (Get started with C#, Part 4)

Microsoft via Microsoft Learn

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
  • Module 1: Learn the difference between many data types, how they work, what they do, and how to choose one over another.
  • In this module, you will:

    • Learn the fundamental differences between value types and reference types.
    • Describe the properties of many new numeric data types, including new integral types and floating point types.
    • Write code that returns the maximum and minimum values that numeric data types can store.
    • Use the new keyword to create new instances of a reference type.
    • Determine which data type you should choose for a given application.
  • Module 2: Take control of the data in your applications, knowing when to apply the correct technique to change data types as needed.
  • In this module, you will:

    • Use the casting operator to cast a value into a different data type.
    • Use conversion methods to convert a value into a different data type.
    • Guard against the loss of data when performing a cast or conversion operation.
    • Use the TryParse() method to safely convert a string into a numeric data type.
  • Module 3: Use powerful helper methods to manipulate and control the content of arrays.
  • In this module, you will:

    • Sort and reverse the order of array elements.
    • Clear and resize the elements of an array.
    • Split a string into an array of strings or characters (chars).
    • Join array elements into a string.
  • Module 4: Use C# to format strings with white space, special characters, padding, and alignment. Give context to numeric data like currency, percentages, and numbers with decimals.
  • In this module, you will:

    • Use character escape sequences to add tabs, new lines, and Unicode characters to our strings
    • Create verbatim string literals, and escape common characters like backslash and double-quotes
    • Merge templates with variables using composite formatting and string interpolation
    • Include various format specifiers for percentages, currency, and numbers
  • Module 5: Use built in methods to extract, remove, or replace data in strings.
  • In this module, you will:

    • Identify the position of a character or string inside of another string
    • Extract portions of strings
    • Remove portions of strings
    • Replace values in strings with different values

Syllabus

  • Module 1: Choose the correct data type in your C# code
    • Introduction
    • Value types and reference types
    • Exercise - Integral types
    • Exercise - Floating-point types
    • Exercise - Reference types
    • Choose the right data type
    • Knowledge check
    • Summary
  • Module 2: Convert data types using casting and conversion techniques in C#
    • Introduction
    • Exercise - data type casting and conversion
    • Exercise - the TryParse() method
    • First Challenge
    • First Solution
    • Second Challenge
    • Second Solution
    • Knowledge check
    • Summary
  • Module 3: Perform operations on arrays using helper methods in C#
    • Introduction
    • Exercise - Sort() and Reverse()
    • Exercise - Clear() and Resize()
    • Exercise - Split() and Join()
    • First challenge
    • First solution
    • Second challenge
    • Second solution
    • Knowledge Check
    • Summary
  • Module 4: Format alphanumeric data for presentation in C#
    • Introduction
    • String formatting basics
    • Exercise - string interpolation
    • Exercise - padding and alignment
    • Challenge
    • Solution
    • Knowledge check
    • Summary
  • Module 5: Modify the content of strings using built-in string data type methods in C#
    • Introduction
    • Exercise - Use the string's IndexOf() and Substring() helper methods
    • Exercise - Use the Remove() and Replace() methods
    • Challenge
    • Solution
    • Knowledge check
    • Summary

Reviews

Start your review of Work with variable data in C# console applications (Get started with C#, Part 4)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.