Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Test LINQ Anagrafica
//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 Program { public static Dictionary<string, string> Anagraphic = new Dictionary<string, string> { { "Rossi", "Mario" }, { "Verdi", "Giuseppe" }, { "Bianchi", "Paolo" } }; public class Person { public string Name; public string Surname; } public static IEnumerable<Person> GetPersons() { return Anagraphic.Select(a => new Person { Surname = a.Key }); } public static void Main(string[] args) { var persons = GetPersons(); foreach (var person in persons) person.Name = Anagraphic[person.Surname]; foreach (var person in persons) Console.WriteLine("Hello, Name: '" + person.Name + "', Surname: '" + person.Surname +"'"); } } }
run
|
edit
|
history
|
help
0
Overloading Unary operator ~ (to reverse the string)
List_methods
dfgthyjui8u7yt5rewsx
Test
base interior 0.1
1
MyProfile_MEDALLA.java
Using System.Reflection to find Property Name and Value of any Generic Class
w
true or false