KeyValuePair(of String, String) cannot be converted to String
pleas share some more details from the modelling with us. Eg. from where the KeyValuePair is coming from (Loop over a dictionary)?
You should be using expression like this:
If your variable to store the output of this expression is DateTime then use this:
dtmVariable = DateTime.Parse(BirthdaysDict(Name).ToString)
If string variable use this:
dtmVariable = DateTime.Parse(BirthdaysDict(Name).ToString).Tostring
Thanks,
Ashok ![]()
What type is the variable Name? Please make sure that it is String and not KeyValuePair.
If your dictionary is string/string then why are you doing datetime.parse and then converting back to string? Just BirthdaysDict(Name) will get you the string value.
