- Home /
How do I I convert a hastable to a string?
I've tried
hashtableAsString=myHashtable.toString();
burt that throes an error:'toString' is not a member of 'System.Collections.Hashtable' .Any ideas? Cheers
Answer by Statement · Mar 13, 2011 at 10:25 PM
I think you meant myHashtable.ToString() (note the capital T)? However I am not sure the resulting string is what you're after.
Hmm yeah that just makes a string like "System.Collections.Hashtable". Any idea how I make a string from the data? Should I just go through the dictionary entries and build it manually I guess?
Yeah. Just go through the contents and use a StringBuilder to create the string (for efficiency).
Your answer
Follow this Question
Related Questions
Convert Int to String? 1 Answer
Convert int to string 2 Answers
Convert type `UnityEngine.Collider' to `string'? 1 Answer
Part of string not showing 1 Answer