The following example behaves as expected under Microsoft's framework.
class Program
def main is shared
buf = System.Text.Encoding.uTF8.getBytes('yo')
for i in buf
print i
To get the same behavior under mono, I had to code it as:
class Program
def main is shared
buf = System.Text.Encoding.utF8.getBytes('yo') to Byte[]?
for i in buf
print i
The first bit of oddness is that under .NET, Cobra wants to use "uTF8", which is what it should be. However, under mono, Cobra wants "utF8".
The second thing is that Cobra is inferring a return type of Int32 for getBytes, which causes a C# compilation error unless it is explicitly cast to what it really is.