Application setting – binding expressions 

In the previous section, we learned how to access the configuration settings from the code. Sometimes, you might want to configure some of the declarative items too. You could achieve that using binding expression. You will understand what I mean in a moment when we look at the code:

  1. Open the Visual Studio and make changes to the Run method to add a new parameter for configuring the QueueTrigger:

  1. The hardcodedqueuename parameter is the name of the queue to which messages will be created. It's obvious that hardcoding the name of the queue is not a good practice. In order to make it configurable, you need to make use of application setting binding expression:

  1. The application setting key must be enclosed in %...% and a key with the name queuename should be created in the Application Settings.