Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
list
//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 class Customer { public int ID{get;set;} public string Name{get;set;} public int Salary {get;set;} } public class Program { public static void Main(string[] args) { Customer cus1 = new Customer { ID =119, Name="Yared", Salary=3500 }; Customer cus2 = new Customer { ID =129, Name="John", Salary=4500 }; Customer cus3 = new Customer { ID =149, Name="Peter", Salary=6500 }; List<Customer> lc = new List<Customer>(); lc.Add(cus1); lc.Add(cus2); lc.Add(cus3); foreach(Customer a in lc) { //Your code goes here Console.WriteLine("ID={0}, Name={1}, Salary={2}", a.ID , a.Name , a.Salary); } Console.WriteLine(); Customer aa= lc[0]; Console.WriteLine("ID={0}, Name={1}, Salary={2}", aa.ID , aa.Name , aa.Salary); } } }
run
|
edit
|
history
|
help
0
a6
Happy
Main5
Checking time span between two timezone times
circleTest
Metodos y como llmarlos
Count vowels in a string
Multidimensional Arrays
Decimal separator diff
MIXED CONTENT - string and numbers separation in a large string