This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); }); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//'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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
NewerOlder