In my code i declared like this :
public string[] s ;
and i need to use this string like this :
s["Matthew"]="Has a dog";
s["John"]="Has a car";
when i use s["Matthew"] an error appears and it says "Cannot implicitly convert 'string' to 'int'" . How can I make a string array to have string index ? if i write this in php it works :
array() a;
a["Mathew"]="Is a boy";
I need it to work also in asp.net !
public Dictionary<string, string> s;
MSDN documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With