public char GetChar(string key)
{
Object value = GetObjectProperty(key);
try
{
if(value is Char)
{
return (char) value;
}
else if(value is String)
{
string svalue = value as string;
if(svalue.Length == 1)
{
return svalue.ToCharArray()[0];
}
}
throw new MessageFormatException(" cannot read a char from " + value.GetType().Name);
}
catch(FormatException ex)
{
throw NMSExceptionSupport.CreateMessageFormatException(ex);
}
}