Browsing 7239 questions and answers with Jon Skeet
I strongly suspect this is the problem: byte[] Bytes = new byte[Convert.ToInt32(fileSize)]; fileInfo.Stream.Read(Bytes, 0, Bytes.Length); You're assuming a single call to Read will read everything. Instead, you should loop round until... more 11/30/2015 9:58:06 AM
I can work with arraylist for this problem but is there a way that works with arrays ? Only by reproducing the logic of ArrayList, basically. No, there's no way of getting a variable-length array. Arrays in Java just don't support... more 11/30/2015 7:12:49 AM
Australia/Brisbane doesn't use daylight saving time at the moment, but it has in the past; look at the australasia file you'll see the few years where it has observed DST. My interpretation of daylight is that it indicates whether that... more 11/30/2015 6:49:00 AM
No, it hasn't added null to the array. It's put a reference to a Person object in the array, and when you call toString() on that Person object, it's returning the value of the name field... which is always null, because of this... more 11/29/2015 3:30:20 PM
The time zone rules for Uruguay changed in release 2015f of the IANA time zone data, which is probably what the web site is using - but I suspect your browser is still using relatively old time zone data. Relevant rules in 2015e: Rule ... more 11/29/2015 12:07:47 PM
When you call Add, that has a void return type... which is why you're getting the error. The overall result of the expression new List<Item>().Add(...) is void. However, you can use a collection initializer: List<Item>... more 11/28/2015 9:34:00 AM
Sounds like you want something more like: // Warning: you should think about time zones... DateTime today = DateTime.Today; DateTime startOfMonth = new DateTime(today.Year, today.Month, 1); DateTime endOfPreviousMonth =... more 11/27/2015 9:41:21 PM
It's not an operator on the delegate type itself, in IL terms - it's defined in the language specification, but you wouldn't find it using reflection. The compiler turns it into a call to Delegate.Combine. The reverse operation, using - or... more 11/27/2015 9:26:19 PM
It sounds like you just want DateTime.Millisecond and then perform some arithmetic. However: You should only call DateTime.Now once, to avoid getting different values from different calls, leading to a very odd display There's no need... more 11/27/2015 4:02:36 PM
Think of i += Incr(ref i) as i = i + Incr(ref i); In other words: Evaluate i Call Incr(ref i) Add the two operands together Assign to i Now Incr(ref i) sets i to 1, but returns 0... so the sum ends up being 0 + 0, which is then... more 11/27/2015 11:15:55 AM