Browsing 7239 questions and answers with Jon Skeet
The parameter is being passed by value, that's all. There's nothing special about extension methods on this front. It's equivalent to: Extensions.Increase(i); You'd need the method to have the first parameter passed by reference (with... more 2/2/2016 9:34:06 PM
It really does behave like a try/finally - so if the application terminates, the resource may not be disposed... and that's usually okay, because normally disposal is for releasing resources held by the process... and the OS will tidy... more 2/2/2016 7:23:42 PM
You can't, basically. The framework doesn't provide a way of performing atomic, lock-free operations on arbitrary structs. more 2/2/2016 5:53:09 PM
I wouldn't expect so, no. It'll compile down to a string.Format call, which I wouldn't expect to be supported. If you really need the projection to be done in the SQL part, you could test it... but otherwise, as normal, use AsEnumerable()... more 2/2/2016 4:13:25 PM
Looking at the documentation, you can see that: GetHashCode is overridden, although the details are not clearly documented. (It could return 0 for all instances, for example.) Equals is overridden in a well-documented way, delegating to... more 2/2/2016 10:56:42 AM
Just use DateTime.ParseExact to specify the format. That's pretty much always the solution when you know the format ahead of time: DateTime date = DateTime.ParseExact( dateString, "dd.MM.yyyy", // This might want to be d.M.yyyy -... more 2/2/2016 7:19:14 AM
It sounds to me like you should: Work out the first day of the month Determine from that how many "extra" days are "borrowed" from the previous month (e.g. 0 if day 1 is a Monday; 1 if day 1 is a Tuesday etc) Add that to the number of... more 2/1/2016 1:12:03 PM
Your buffer doesn't need to be the same size as the file at all. You're only using it as temporary storage, to copy a chunk of the input file into your output MemoryStream. I'd personally use something like 16K as the size - not big... more 2/1/2016 12:59:38 PM
I suspect the problem may be that you're not specifying the locale - so it's using your system locale instead, which may have different am/pm specifiers. Here's an example which works for me in desktop Java: import java.util.*; import... more 2/1/2016 6:53:36 AM
It sounds like your Silverlight project doesn't have a reference to the web project. That's probably a good thing, mind you - I would suggest you set up a third project (as a Silverlight class library) called "Common" or something similar,... more 2/1/2016 6:48:33 AM