Observe the following snippet:

byte[] test = { 3, 15, 3, 2, 5, 6, 4, 3 };
string value = BitConverter.ToString(test, 4, 0);
Console.WriteLine(value);

On MS the BitConverter.ToString returns an empty string if the (third param)
length is 0, on mono it throws a:

Unhandled Exception: System.ArgumentOutOfRangeException: capacity must be
greater than zero.
Parameter name: capacity
-1
 at System.Text.StringBuilder..ctor (System.String value, Int32 startIndex,
Int32 length, Int32 capacity) [0x00000]
 at System.Text.StringBuilder..ctor (Int32 capacity) [0x00000]
 at System.BitConverter.ToString (System.Byte[] value, Int32 startIndex,
Int32 length) [0x00000]


Known? Expected?

I don't want to annoy on the list, so you can stop me anytime.

Jae
_______________________________________________
Mono-devel-list mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to