As a follow up to this, I’ve gone back to my original method and weirdly it works but im unclear as to why. If anyone could advise why the variable declaration isn’t as strict as I was led to believe that would be much appreciated.
So based on doing this:
dictionaryOrders = New Dictionary(Of Tuple(Of String, String), Dictionary(Of String, String))
then a For Each row in dtFiltered
di_hSTariff = row(“SKU”).ToString.Trim()
di_orderID = row(“MarketID”).ToString.Trim().Replace(“#”,“”)
di_pricePaid = row(“SoldPriceLessVAT”).ToString()
di_goodsPurchasedID = row(“GoodsPurchasedID”).ToString()
di_Qty = row(“Qty”).ToString()
di_compositeKey = New Tuple(Of String, String)(di_hSTariff, di_orderID)
di_InnerDictionary = New Dictionary(Of String, String)
then a series of assigns to attach my values to the composite key:
di_InnerDictionary(“SoldPriceLessVAT”) = di_pricePaid
di_InnerDictionary(“GoodsPurchasedID”) = di_goodsPurchasedID
di_InnerDictionary(“Qty”) = di_Qty
then a final assign to link up everything, so the key variables are linked to the value variables:
dictionaryOrders(di_compositeKey) = di_InnerDictionary
My Excel headers are: SKU, MarketID, SoldPriceLessVAT, GoodsPurchasedID, Qty
dictionaryorders is set up as follows: System.Collections.Generic.Dictionary<System.Tuple<System.String,System.String>,System.Collections.Generic.Dictionary<System.String,System.String
di_InnerDictionary is set up as follows: System.Collections.Generic.Dictionary<System.String,System.String>
weirdly, it all works but im unclear as to why:

…reason being is that I set up dictionaryorders to be a tuple of 2 strings and a dictionary of 2 strings. In addition, di_InnerDictionary was set up as a dictionary of 2 strings.
So why am I able to add a third string?