The error messages are telling you all you need to know;
Field 'SCANLA.GatewayMsgIDs.OpenFiles' is never assigned to, and will always have its default value null
Means that you're never assigning the variable
OpenFiles
, so it will always be
null
and you will get a
NullReferenceException
thrown at you as soon as you try to use one of its members.
Make sure you assign the
OpenFiles
variable before first use and you'll be fine.
Hope this helps,
Fredrik