Reflection
Metaprogramming
Programming Paradigms
Advanced Language Features
Fundamentals
using System; using System.Reflection; using System.Linq; class Kata { private static readonly string LANGUAGE = "C#"; public static void Main() { Console.WriteLine($"Hello, {LANGUAGE}!"); } }
- using System;
- using System.Reflection;
- using System.Linq;
- class Kata
- {
- private static readonly string LANGUAGE = "C#";
- public static void Main()
- {
System.Console.WriteLine($"Hello, {typeof(Kata).GetRuntimeFields().First(x => x.Name == "LANGUAGE").GetValue(null).ToString()}!");- Console.WriteLine($"Hello, {LANGUAGE}!");
- }
- }
class Kata { public static void Main() { string language = "C#"; System.Console.WriteLine($"Hello, {language}!"); } }
class Kata{public static void Main(){- class Kata
- {
- public static void Main()
- {
- string language = "C#";
System.Console.WriteLine("Hello, {0}!",language);- System.Console.WriteLine($"Hello, {language}!");
- }
- }
Fundamentals