Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Basic Coding Practice | Dealing with Data Types
C# Basics
course content

Contenido del Curso

C# Basics

Basic Coding Practice

A number is stored in a variable called num in the form of a string. Add 2 to the stored number. You may use the following steps:

  • Convert the value of num string to an integer and store it in a new integer variable called temp.
  • Add 2 to the value of temp.
  • Convert the value of temp to a string and assign it to the variable num
cs

main

  1. Use Convert.ToInt32() and Convert.ToString().
cs

main

¿Todo estuvo claro?

Sección 2. Capítulo 14
We're sorry to hear that something went wrong. What happened?
some-alt