jefffhaynes / XBee

A .NET library for XBee wireless controllers
MIT License
41 stars 17 forks source link

[FieldLength] for null string #2

Closed abrasat closed 9 years ago

abrasat commented 9 years ago

It seems that the reserved field length for a string is ignored if the string is null. If the string is empty, it works fine.

[FieldLength(50)] [SerializeAs(Encoding = "ASCII")] public string Data { get; set; }

jefffhaynes commented 9 years ago

Thanks, was this meant to be against BinarySerializer or XBee? If it's XBee, which class is this in?

abrasat commented 9 years ago

Sorry, was meant for the BinarySerializer. I will repost there, please remove the issue here.