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

1 Answer

1

I think you meant myHashtable.ToString() (note the capital T)? However I am not sure the resulting string is what you're after.

Yeah. Just go through the contents and use a StringBuilder to create the string (for efficiency).

http://msdn.microsoft.com/en-us/library/system.text.stringbuilder(v=VS.90).aspx