Invoke Vb.NET Code dictionary error

Hi @Hara_Gopal

I think u had forget to declare the dictionary

Can u try this code

Dim dictionary As New Dictionary (Of String, String)

Dim item, key, val As String

Try	
	For Each item In lst 'lst is a list passed as input
		key = item.Split(CChar(":"))(0).ToString.Trim
	    val = item.Split(CChar(":"))(1).ToString.Trim
	    emailDict.Add(key, val)
		
	Next
	
Catch e As Exception
	
	console.WriteLine(e)
	console.WriteLine(e.Message)
	console.WriteLine(e.Source)
	
End Try

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

2 Likes