Updated to the C++# version with fixed overloads of free functions.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>