File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/c# Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ namespace retoProgramacion2025
3+ {
4+ internal class reto00
5+ {
6+ static void Main ( string [ ] args )
7+ {
8+ // https://learn.microsoft.com/es-es/dotnet/csharp/tour-of-csharp/overview
9+ // Comentario de una linea
10+
11+ /* Comentario de
12+ * varias
13+ * lineas
14+ */
15+
16+ //Crear variable y constante
17+ int entero = 1 ;
18+ const int constanteEntero = 2 ;
19+
20+ // Tipos primitivos
21+ sbyte mySbyte = 1 ;
22+ Console . WriteLine ( mySbyte ) ;
23+ byte myByte = 1 ;
24+ Console . WriteLine ( myByte ) ;
25+ short myShort = 1 ;
26+ Console . WriteLine ( myShort ) ;
27+ ushort myUShort = 1 ;
28+ Console . WriteLine ( myUShort ) ;
29+ int myInt = 1 ;
30+ Console . WriteLine ( myInt ) ;
31+ uint myUInt = 1 ;
32+ Console . WriteLine ( myUInt ) ;
33+ long myLong = 1 ;
34+ Console . WriteLine ( myLong ) ;
35+ ulong myULong = 1 ;
36+ Console . WriteLine ( myULong ) ;
37+ float myFloat = 5.9998f ;
38+ Console . WriteLine ( myFloat ) ;
39+ double myDouble = 5.99 ;
40+ Console . WriteLine ( myDouble ) ;
41+ decimal myDecimal = 10.0m ;
42+ Console . WriteLine ( myDecimal ) ;
43+ char myChar = 'A' ;
44+ Console . WriteLine ( myChar ) ;
45+ bool myBoolean = false ;
46+ Console . WriteLine ( myBoolean ) ;
47+ Console . WriteLine ( "" ) ;
48+ Console . WriteLine ( "¡Hola, C#!" ) ;
49+ }
50+ }
51+ }
You can’t perform that action at this time.
0 commit comments