Could not initialise dictionary

Hello Friends,

I’m trying to use dictionary but, i have this message i hadn’t seen before:

I did not found the related namespace :

any help ?

are you working in VB.Net or C#?

Hi,

Can you try the following?

new Dictionary<string,object>()

Regards,

Hi @abdel

Check the below screenshots of creation of an dictionary. Try deleting the value and re-initializing it again. Hope it helps!!


Regards,

but still this error:

Hi,

Please use square bracket as the following. ( because of C#)

 Dictionarytofill["Labels"]

Regards,

it works, thanks,

but why the assign "Dictionary = System.Collections.Generic.Dictionary(of string)(string) " did not work ?

Hi,

As your project language is C#, the expression should be as the following.

new Dictionary<string,object>()

If your project language is VB, it should be

New Dictionary(Of String, Object)()

If you are familiar with VB, it might be better to re-create your project as VB.

Regards,

alright ! thank you for the help!

in fact my aims through this dictionary is to create issues in JIRA so i have used “jira scope” with API token, but when executing this error appear:

Hi,

It seems reference matter. For now, can you close studio then re-open this project? Automatic recovery may run.

And perhaps you should raise a new topic if the above doesn’t solve this, because it’s apart from this topic’s title and it will help those who face same issue.

Regards,

it don’t work, i will create new topic!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.