Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
linq jean by Fausto
//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 { class Person{ public String Name{get; set;} public String LastName{get; set;} public byte Age{get; set;} public String Country {get; set;} public String City {get; set;} } class Student { //public Person person = new Person(); public Person Person {get; set;} public byte Course {get; set;} } public class Program { public static void Main(String[] args) { //Console.WriteLine("Hola Flow {0}", person.Age); var persons = new List<Person>(); persons.AddRange(new Person[]{ new Person { Name = "Fausto", LastName = "Garces", Age = 32, City = "Santo Domingo", Country = "The World" }, new Person { Name = "Jean", LastName = "Peña", Age = 26, City = "Santo Domingo", Country = "Dominican Republic" }, new Person { Name = "Ramon", LastName = "Rodriguez", Age = 236, City = "Santo Domingo", Country = "Dominican Republic" }, new Person { Name = "Manuel", LastName = "Gonzalez", Age = 28, City = "Azua", Country = "Dominican Republic" }, new Person { Name = "Fernando", LastName = "Espinosa", Age = 32, City = "Bani", Country = "Dominican Republic" }, new Person { Name = "Eugenio", LastName = "Duran", Age = 12, City = "Miami FL", Country = "United State" }, }); Console.WriteLine("Flow Flow"); //Select person by age Console.WriteLine("Select person by age"); //Do this with a select var youndPeople = persons.Where(p => p.Age > 18).ToList(); persons.ForEach((p) => { Console.WriteLine("name:{0} Age:{1} Pais:{2}",p.Name, p.Age, p.Country); }); } } } //create peson classs***** //Create student class**** //Create a main ********** //Create a list of persons(add data)************ //First linq by Jean //Select person by age
run
|
edit
|
history
|
help
0
out parameters
Modulul 3, Exerciţiul 2 – Crearea şi utilizarea unui tip struct
teste
Typing Words
Dio
Sort string collection by length
LINQ - Inner Join
Whats Wrong in Here ?
DateTime change clock
Order of Ops 4.2