I have created a dictionary like
for each row of a table
Config(row(“key”).tostring)=row(“Value”)
Now i have created an array of the values using key as below:
Array={Config(“abc”).ToString, Config(“efg”).ToString, Config(“hij”).ToString, Config(“klm”).ToString}
now i have applied a loop to find the missing value
for each item in array
if
String.IsNullOrEmpty((item.ToString))
WriteLine = item+“is missing”
Here I am not getting anything in item as the value of item is empty, i want the key name of item to print here.
any idea how to get this done.
Hi @uipexplore,
1.If you are keeping in the order then keep an index variable and find the index where it is showing null.
2.You can get the keys by dictionaryNames.keys and take the key according to that index.
3.if there are more null values keep the indexes in an array and use.
Hope this helps…
Cheers.
vashisht.
No bro,
var index=0
for each item in array
if
String.IsNullOrEmpty((item.ToString))
array[i]=index;
index=index+1;
} DictionaryName.keys gives the keys list.
the above index number in the above list gives the required key whose value is null.
Cheers.
Just keep another variable called index and increment it.If the if condition is met store that index.and search with that index in DictionaryName.keys list that is the required key.