.NET Fiddle

CSharp · Console

/Program.cs

using System;
using System.IO;
using System.Threading;
					
public class Blink
{	
	public static void Main()
	{		
		Observable
			.Repeat(Observable.Unit)
			.Select((index, _) => index % 2 == 0 ? "00" : "01")
			.Delay(TimeSpan.FromSeconds(2))
			.Aggregate(
				new StreamWriter(FilePath), 
				writer => (writer, state) => writer.Write(state)
			)
			.Subscribe(writer => writer.Close());
	}
}
;