Files
s7netplus/S7.Net/Types/ByteArray.cs
Thomas Jäger 00e22ee214 Incorporate fixes from #117 (moved to helpers)
fix array naming.
2018-05-16 15:50:00 +02:00

45 lines
796 B
C#

using System.Collections.Generic;
namespace S7.Net.Types
{
class ByteArray
{
List<byte> list = new List<byte>();
public byte[] Array
{
get { return list.ToArray(); }
}
public ByteArray()
{
list = new List<byte>();
}
public ByteArray(int size)
{
list = new List<byte>(size);
}
public void Clear()
{
list = new List<byte>();
}
public void Add(byte item)
{
list.Add(item);
}
public void Add(byte[] items)
{
list.AddRange(items);
}
public void Add(ByteArray byteArray)
{
list.AddRange(byteArray.Array);
}
}
}