You searched for jon skeet
. We found 71
results in 0.223 seconds.
Can you please explain why doesn't the memory model does not guarantee that the new value of instance will be seen by other threads? The memory model is complex and not terribly clearly documented at the moment, but fundamentally... more
It sounds like you need a combination of Join and Select: String.Join("", _ l.Select(Function(s as String) String.Format("<li>{0}</li>", s)) Of course, you could always write your own JoinFormat extension method - that... more
I strongly suspect that the problem is that you're ignoring the return value from InputStream.read, other than to check for the end of the stream. So this: while (in.read(inBuff) > 0) { // This always decodes the *complete* buffer ... more
Is there a room for optimizing the existing code? Absolutely. The first place I'd change has nothing to do with how you load the XML - it's string concatenation. I'd change your recursiveOperation method to: private static string... more
You've effectively got a cyclic dependency: your Looper needs to be initialized with the Commandable, and the Commandable needs to be initialized with the Looper. The compiler is absolutely right to complain - imagine if the Looper... more
You're trying to start the task returned by the async method - that isn't the cold task that you started out with. Indeed, if you add some diagnostics to your Task.Run call, you'll see that an exception is thrown: ... more
Noda Time deliberately ships with an internal copy of the R# annotations, so that those who do want them can benefit from them - it will know which methods are pure, etc. It sounds like you don't actually want to use annotations at all,... more
I suspect you want flatMap instead of map, and then use Collectors.toCollection to create the sorted set: final SortedSet<String> fields = files .stream() .parallel() .flatMap(x -> getFields(x).stream()) ... more
Yes, there's a massive difference. In example 1, intro1 and intro2 refer to different objects. In examples 2 and 3, intro1 and intro2 have the same value - they refer to the same object, so if you call Object.ReferenceEquals(intro1,... more
It seems to me that all you need is the DateTime.TimeOfDay property. I would then recommend changing your conditions slightly if you're able to, so that the lower bound is inclusive and the upper bound is exclusive, e.g. var time =... more