Skip to content

Instantly share code, notes, and snippets.

using System;
namespace FizzBuzz
{
internal class Program
{
private static void Main(string[] args) => new Action<Action<int>>(f => (f = (x => (x > 1 ? new Action(() => f.Invoke(x - 1)) : () => { }).Invoke()) + f).Invoke((args != null && args.Length > 0 ? new Func<int>(() => int.Parse(args[0] ?? "100")) : () => 100).Invoke())).Invoke(x => { Console.WriteLine(new Func<string, string>(s => s == "" ? "{0}" : s).Invoke((x % 3 == 0 ? "Fizz" : "") + (x % 5 == 0 ? "Buzz" : "")), x); });
}
}
//'Block' is a Textblock in my form
//All of this method works perfectly fine
private void AddLine(string text)
{
if (Block.Inlines.Any())
Block.Inlines.FirstInline.Foreground = Brushes.Black;
var line = new Run(text+"\n") {Foreground = Brushes.Black};
Block.Inlines.Add(line);
private void Main_OnLoaded(object sender, RoutedEventArgs e)
{
var thread = new Thread(() => TextThread("Testing..."));
thread.Start();
}
private void TextThread(string text, Brush brush = null)
{
var brushFixed = brush ?? Brushes.Black;