internal static String8 ConvertMapiPtString8ToString8(object stringData, int codePage) { String8 @string = null; string text = stringData as string; if (text != null) { @string = new String8(text); } else { byte[] array = stringData as byte[]; if (array != null) { @string = new String8(new ArraySegment <byte>(array)); } } if (@string != null) { @string.ResolveString8Values(MarshalHelper.GetString8Encoding(codePage)); } return(@string); }