Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
nums y lists
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { /* public enum CarModel //Por debajo lo almacena con un número. Ford sería por defecto 0, Seat 1, Opel 2, .... { Ford, Seat, Opel }*/ public enum CarModel //Yo si quiero le puedo poner los valores que quiera. { Ford= 56,//Los números solon sirven si en base de datos yo lo guardara como número, Seat = 90, Opel = 3, } public class Program { public static void Main(string[] args) { /* var coches = new List<string>(); coches.Add("Ford"); coches.Add("Seat"); coches.Add("Melón"); foreach(var coche in coches) { Console.WriteLine(coche); }*/ var coches = new List<CarModel>(); coches.Add(CarModel.Ford); coches.Add(CarModel.Seat); coches.Add(CarModel.Seat); foreach(var coche in coches) { int numero = (int)coche; Console.WriteLine("Tengo un coche de modelo "+coche + "que se corresponde con el número "+numero); } } } }
run
|
edit
|
history
|
help
0
List
custom stack Implementation
Intuit // C# // listing_4.3 (StreamWriter // @"c:\Temp\output.txt")
C:\Documents and Settings\Админ\Рабочий стол\ШЭ информатика
Get Combined Placeholder Settings and New Content Length
sdfrgthyuyt dsxcsd
Tarkov Time
Math 9.7 (Added Speed Math)
IEquatable_resolved
Fórum ➡ Border of a string S with at least 3 non-overlapping solutions ( yield version ) ♦