Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Declarando Variáveis com Tipos Explícitos | Lidando com Tipos de Dados
Noções Básicas de C#

book
Declarando Variáveis com Tipos Explícitos

  1. Declare uma variável chamada bigValue do tipo unsigned long. Inicie-a com um valor de 123456789 .

  2. Declare uma variável chamada smallValue do tipo integer. Inicie-a com um valor de 1234 .

cs

main

copy
using System.Drawing;
using System;

namespace ConsoleApp
{
internal class Program
{
static void Main(string[] args)
{
// Replace ___ with necessary data type

___ bigValue = 123456789;
___ smallValue = 1234;

Console.WriteLine(bigValue);
Console.WriteLine(smallValue);
}
}
}
12345678910111213141516171819
using System.Drawing; using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Replace ___ with necessary data type ___ bigValue = 123456789; ___ smallValue = 1234; Console.WriteLine(bigValue); Console.WriteLine(smallValue); } } }
  1. A palavra-chave para o tipo de dado unsigned long é ulong.

cs

main

copy
using System;

namespace ConsoleApp
{
internal class Program
{
static void Main(string[] args)
{
// Replace ___ with necessary data type

ulong bigValue = 1234567;
int smallValue = 1234;

Console.WriteLine(bigValue);
Console.WriteLine(smallValue);
}
}
}
123456789101112131415161718
using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Replace ___ with necessary data type ulong bigValue = 1234567; int smallValue = 1234; Console.WriteLine(bigValue); Console.WriteLine(smallValue); } } }
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 2

Pergunte à IA

expand
ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

some-alt