Browsing 7239 questions and answers with Jon Skeet
The problem is that you're calling Invoke from the call_DoWork method - and Control.Invoke invokes a delegate on the UI thread. You just want to invoke the delegate on the current thread: var work = (MethodInvoker)... more 4/5/2014 3:32:15 PM
After a quick look at the documentation, I think you want something like: [ProtoMember(1, DataFormat = DataFormat.FixedSize)] public DateTime DT; [ProtoMember(2,)] public double BidPrice; [ProtoMember(3)] public double... more 4/5/2014 10:53:33 AM
There's no fixed answer to that, because it depends on which months those are - and indeed which year it is. Also potentially which time zone you're in, if you want to take account of that. (I'm assuming you mean the Gregorian calendar, by... more 4/5/2014 8:30:41 AM
I'm not a GWT developer, but I suspect this is calling Panel.add(Widget) which documents these steps (emphasis mine): There are several important things that must take place in the correct order to properly add or insert a Widget to a... more 4/5/2014 8:13:55 AM
You're not assigning a value to statement in that method, and you're using the overload of executeUpdate from Statement... rather than the parameterless one in PreparedStatement. I suspect you actually want to assign the statement using... more 4/4/2014 9:22:33 PM
Aside from everything else, the most fundamental problem you've got here is that you're converting binary data to a string just using the platform default encoding, as if it's actually just text. It's not - it's binary data. If you want... more 4/4/2014 8:17:20 PM
You can get a list of tasks very easily - for example: var tasks = uris.Select(async uri => { using (var client = new HttpClient()) { return await... more 4/4/2014 8:11:35 PM
Well you can separate out the logic from the format, to start with: String out = String.format("Text %stextcontinues", obj == null ? "" : obj.getStr() + " "); more 4/4/2014 4:26:51 PM
You have to call MulticastDelegate.GetInvocationList, which will allow you to invoke one handler at a time: // TODO: Don't call your event e, and use Func<int, int, int> foreach (Compute compute in e.GetInvocationList()) { int... more 4/4/2014 3:38:58 PM
No, absolutely not - and here's why... This code still has to work: BaseProvider provider = new TestProvider(); provider.NewItem(10); That's just the normal requirements of polymorphism. You can't change a signature when you're... more 4/4/2014 3:30:10 PM