Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
dict
//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 void Main(string[] args) { var conditions = new Dictionary<string, string>() { {"Id", "Id"}, {"UserId", "request.AuthorId" }, {"UserEmail", "request.AuthorEmail" }, {"UserLocation",""} }; foreach (var condition in conditions.Where(x => !string.IsNullOrEmpty(x.Value))) { Console.WriteLine("{0} {1}", condition.Key, condition.Value); } A a = new B(); a.GetMessage(); } } public class A { protected virtual void MethodA() { Console.WriteLine("Hello, world! + Method A from A"); //return; } public void GetMessage() { MethodA(); } } public class B : A { protected override void MethodA() { base.MethodA(); Console.WriteLine("Hello, world! + Method A from B"); //return; } } }
run
|
edit
|
history
|
help
0
IMT
Asignacion 692018
sulu
CommandForce3
loop break continue
My Test
Sam a,b and c
SortedDictionary : Add と foreach
jjj
4. Inheritance