Revert "CSharp : use the same java code"

This reverts commit d6ed1544b3478a8acc43af0ca3886383f43962ad.