Browsing 7239 questions and answers with Jon Skeet
Well, Sets.union returns a Sets.SetView<E>, not an ImmutableSet<E>. So you can do this: public final static Sets.SetView<Colors> ourColorSet = Sets.union(myColorSet, yourColorSet); ... which in many cases would... more 11/20/2015 7:16:38 AM
Firstly, you would need to update the data in order to know about the change, and obtain an appropriate IDateTimeZoneProvider in your code. Instructions for that are in the user guide but we hope to make it simpler in the future. In... more 11/20/2015 6:54:47 AM
You can use TextUtils.join instead: String result = TextUtils.join(", ", list); (String.join was added in Java 8, which is why you can't use it in Android.) more 11/19/2015 11:46:04 AM
You're being confused by the fact that the Value property on XElement will concatenate all the text nodes within an element, including within descendants. That happens to be getting the text value of the Name child element, because that's... more 11/19/2015 10:09:29 AM
Don't use either of these approaches. Either convert into hex directly (not using BigInteger) or use base64. BigInteger will faithfully reproduce numbers, but it's not meant to be a general purpose binary-to-hex converter. In particular,... more 11/19/2015 7:24:30 AM
I suspect you could use: public void Update(string key, string Value) { File[key] = Value; } That depends on how the dynamic object implements indexing, but if this is a Json.NET JObject or similar, I'd expect that to work. It's... more 11/19/2015 7:08:20 AM
Although DirectoryInfo and FileInfo are in the System.IO namespace, in the DNX world they're in the System.IO.FileSystem assembly. So you need to add a dependency of: "System.IO.FileSystem": "4.0.1-beta-23302" more 11/19/2015 7:06:11 AM
It sounds like you actually want a static variable for the dictionary, as that's not going to change over time. I'd then use a StringBuilder to build up the result, rather than trying to replace text within the string. (Strings are... more 11/19/2015 6:59:58 AM
What I want to accomplish is that if no command line arguments are specified, it will display a default message. That suggests you should check for the length of the arguments with the Length property. So something like: private void... more 11/18/2015 5:58:35 PM
I discovered that tasks that come from an async method are always shown as RanToCompletion although the task itself was still running. Yes, because your void method has completed, and that's all that Task.Run is calling. If instead... more 11/18/2015 4:18:25 PM