Converted to C#

Signed-off-by: FlapperDoodlez <flapperdoodlez@users.noreply.github.com>