DotNet-100-PreWork-GitBook
  • DotNet PreWork
  • Part 0: Intro
    • 1.0: Installation
    • 2.0: Getting Started
    • 3.0: Configuration
  • Part 1: HTML Fundamentals
    • Basic Tags
    • H & P Tags
    • Lists
    • Links
    • Images
    • Tables
    • Divs
    • Inputs
    • Forms
    • Sections
    • Articles & Headers
    • Footers
    • Navs
    • iFrames
  • Part 2: CSS Fundamentals
    • CSS Set Up
    • Classes
    • Ids
    • Margins & Padding
    • Fonts
    • Backgrounds
    • Widths & Heights
    • Borders
    • Positions
  • Part 3: C# Fundamentals
    • 1.0: Hello World
    • 2.0: Variables
    • 3.0: Basic Types
    • 3.0a: Types Challenges
    • 3.0b: Types Challenges Answers
    • 4.0: Operators
    • 5.0: Strings
    • 6.0: Booleans
      • 6.0a: Boolean Challenge
      • 6.0b: Challenge Answers
    • 7.0: Conditionals
      • 7.1: Switch Case
      • 7.2: If Statements
      • 7.3: Ternary Expressions
    • 8.0: Numbers
    • 9.0: Loops
      • 9.0a: Loop Challenges
      • 9.0b: Challenge Answers
    • 10.0: Classes and Objects
    • 11.0: Properties
    • 12.0: Useful-Links
Powered by GitBook
On this page
  • File Location
  • Bronze
  • Silver
  • Gold
  1. Part 3: C# Fundamentals

3.0a: Types Challenges

In this module we'll provide challenges for C# types and variables.

File Location

  1. Right click on the solution you made in the first module, go to Add > New Project.

  2. Select Console App (.NET Framework).

  3. Name it 03_Types_Challenges.

  4. Write your code for this module within Program.cs of that project.

Bronze

  • Create a list of value types: int, string, bool, float, double, decimal.

    • Do two examples for each type.

    • One is a declaration only.

    • The other is a declaration with initializer.

  • Print some of the values in the console.

Silver

  • Use those types to concatenate a string, any string will do.

    • Hint: The + operator can be used with strings.

Gold

  • Declare the year you were born as a single string concatenated from several variables.

Previous3.0: Basic TypesNext3.0b: Types Challenges Answers

Last updated 7 years ago

Answers