c# - Retrieve all keys in a hash table into a string -
Coding language is C # 3.0 - What is the most optimal method for recovering all the hashtable keys in a different string than the delimiter?
Updates: The keys are already in the wire
Regards,
naveenj
Do you really mean a non-generic Hashtable
? You can use LINQ, assuming that is available to you:
string key = string .join (",", table.cause.lt; object & gt; (.) Select (x => x. Ostring ()) .oir ());
There may be fast approaches, but in this way I had to go for readability. Just microse-optimize when you have proved that this is an obstacle.
Comments
Post a Comment