Added C# version of polling read