c# version up to date with Java Version!

Transfer of java version into c#!