You searched for jon skeet
. We found 71
results in 0.097 seconds.
Semantically I find this a little weird, since the extension method is called cast.. Shouldn't it be casting? It's casting each element if it needs to, within CastIterator... although using a generic cast, which won't use explicit... more
Okay - the problem is actually in the array implementation of ICollection<T>.Contains. You can see that simply like this: static void Main(string[] args) { var ab = new MyEquatable("A", "B"); var target = new... more
You can use MethodInfo.GetMethodBody() to get a MethodBody, then create a hash based on whatever you like (e.g. the IL byte array) using whatever kind of hash you want (e.g. SHA-256). Of course, it's possible for the IL to change without... more
I raised Roslyn issue 2110 for this - the C# 6 spec is changing to allow this. Mads Torgersen has indicated that the change is by design: The rule was well intended, in that it was supposed to minimize the risk of "moving code around"... more
Two options: Specify a "subscription delegate" via a lambda expression. I wouldn't like to guess at what this would look like in VB, but in C# it would be something like: (control, handler) => control.MouseEnter += handler; Then... more
I suspect that it's just a matter of MemberInfo.Equals not working as you expect. That's easy to test: var m1 = get("x"); var m2 = get("x"); Console.WriteLine(m1.Equals(m2)); If that prints False, then that's the issue, and you should... more
Why does this happen? Because the Where call is receiving a type argument of ParentQueryElement as TSource. It creates a result based on TSource as a new object... so you end up with something which "knows" about ParentQueryElement... more
You're using the wrong keys for decrypting. You're encrypting with key B, then encrypting the result with key A. You're then trying to decrypt that result with key B, and the final result with key A. Each time you decrypt, you should be... more
This is what's tripping you up: xmlns="http://fantasysports.yahooapis.com/fantasy/v2/base.rng" You're asking for elements in the unnamed namespace - but the elements default to the namespace shown above. It's easy to fix that in LINQ... more
Note: please do not treat this as an "official answer from Google". Although I work at Google, I don't work on the Drive API. I've reproduced the problem, and reported it to the Drive API team, who may be able to provide more details. In... more