C# .Net Core Introduction To Types
1 h 45 m
Pausable for 8 hours
Lab Overview
Variables and Types are absolutely critical when it comes to programming. Without variables, you would not have an easy way to remember where values are stored and reference them in various places within our programs. Without types, you wouldnt know what type of information is stored in the variable, so everything would have to be treated in a similar fashion. C# is a strongly-typed language. As such, working with types and variables goes hand-in-hand in C#.

Related Learning Path(s):
Programming Fundamentals with C#
  • Understand the different types available in C#.Net
  • Be able to identify the classification for each type as to whether it is a reference type or a value type
  • Understand variables and the assignment operator
  • Be able to store values in variables and use them in expressions
  • Be aware of some of the pitfalls to avoid (i.e. using formatting or interpolation for strings)
  • Create a simple procedural program that works with user input, performs mathematical operations, and writes output to the console.
  • Be able to work with numbers, strings, and booleans
  • Understand basic built-in string operations
In this exercise, you will read about the different types that you will encounter in C#.Net. Additionally, you'll take a fairly deep dive into the reason behind types and why certain numbers have limited minimum and maximum values. You'll also get some information about how variables store values.
In this exercise, you will work with a basic console application to learn about using types and variables. The code you build in this lab is for learning purposes so feel free to experiment even more than what is covered in this lab to become more familiar with types and variables.
In this exercise, you will learn about the string type. Strings are a critical part of day-to-day work for a devloper. Strings allow us to transmit information, store the state of objects, communicate data structures, take and respond to commands from users, and more.
In this exercise, you will learn about the boolean ( **bool** ) type. Booleans leverage boolean logic to store truth values. Some operations will be extremely simple. Does the variable equal 10? Does the condition exist? Some operations will be more complex. Does condition one exist and either of condition two or condition three exists? By the end of this exercise you'll know how to store those results in variables.
In this final exercise, you'll get a chance to put it all together and learn just a couple more pieces of information about the string type and working with booleans.
Real-Time Lab
Not Registered?
Create Account
Already Registered?
What are Labs?

Labs provide a live environment to get hands-on experience using the same tools and services in the real world.

Learn More