Some modifications on the I/O handling in CSharpGenerator (types)