Swati Bhartiya Swati Bhartiya - 1 month ago 13
C# Question

Convert a Microsoft.Bot.Connector.Attachment to a Microsoft.Bot.Connector.Herocard

I have a method wherein I have passed a HeroCard as an attachment.
Now, I want to use the same attachment in order to get the HeroCard back.

Is there a way to do so ?

Answer Source

The property Content of the Attachment will contain the card as you can see in the CreateAttachment method that is being called by the ToAttachment extension method from the cards.