support writing object[] array for convenience

This commit is contained in:
Michael Becker 2020-05-09 22:51:08 -04:00
parent 9053e149b4
commit 53898136ae
No known key found for this signature in database
GPG Key ID: 506F54899E2BFED7

View File

@ -583,6 +583,16 @@ namespace UniversalEditor.IO
/// <exception cref="System.ObjectDisposedException">The stream is closed.</exception>
public void WriteObject(object value)
{
if (value is object[])
{
object[] array = (object[])value;
for (int i = 0; i < array.Length; i++)
{
WriteObject(array[i]);
}
return;
}
Type objectType = value.GetType();
if (objectType == typeof(Byte))