How to use dialogs in bot applications

Now, we will see how to use dialogs for the same Hello World bot application.

Dialogs will be used in a conversational process, where there is an interaction or exchange of messages between the user and the bot. Each dialog is an abstraction that encapsulates its own state in a C# class that implements IDialog. To work with dialogs, we need to import the Microsoft.Bot.Builder.Dialogs namespace. Add a C# class HelloWorldDialog into your project. To add a class, right-click on your project and navigate to Add | Class... from the menu:

Figure 16: Using Visual Studio IDE to add a new class to an existing ...

Get Building Bots with Microsoft Bot Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.