Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 6
    I'd say that it depends strongly on context though; if I had three integer types to combine, and performance was not critical, this works perfectly fine with minimal chance of making a mistake. Of course, all of this is completely redundant as of .NET 4, since Microsoft will be providing us with (presumably correct!) Tuple types out of the box. Commented Jun 6, 2009 at 1:33
  • You could even use this method in combination with a JavaScriptSerializer to concatenate an array of string and/or integer types for you. This way, you don’t need to come up with a delimiter character yourself. Commented Jul 21, 2014 at 15:13
  • 4
    This could get real messy if any of the keys (key1,key2,key3) were strings containing the deliminator ("#") Commented Feb 12, 2016 at 0:01