public byte[] GetBytes(string key)
{
Object value = GetObjectProperty(key);
try
{
if(value is Byte[])
{
return (byte[]) value;
}
else
{
throw new MessageFormatException(" cannot read a byte[] from " + value.GetType().Name);
}
}
catch(FormatException ex)
{
throw NMSExceptionSupport.CreateMessageFormatException(ex);
}
}