QuestionQ152

VerifiedException Handling

A developer must create a process for the Human Resources team. While developing it, they attempt to run a workflow that contains the following dictionary variable:

Question Image

However, this error appears:

Question Image

What could be causing the error?

Explanation

The dictionary object must be initialized before its indexer can be used. A declared but uninstantiated dictionary is Nothing, so assigning through PinMapping("John") raises a NullReferenceException. The Visual Basic dictionary indexer syntax is valid, and assigning to a key that does not exist adds that key/value pair.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!