How to access data and customtype in Basemessage?

Hi. i want to display chat from basemessage by customtype but i can’t access it.

I can access message of Data or Customtype when declare like this.

public List normalChat = new List();
normalChat[i].DATA, normalChat[i].CustomType

but i cannot access them if declare like this

public List normalChatMessage = new List();
normalChatMessage [i].DATA, normalChatMessage [i].CustomType

are there any way can access BaseMessage’s Data or Customtype?

I saved whole Basemessage on member list when use LoadHistory with queryresult. and i wanna display messages from member list using Data and Cutomtype

thanks.

Hi Thompson,

Could you check the data type of the List item?
You might be able to check the instance type like

normalChatMessage[i].GetType() == typeof(Basemessage)