Browsing 7239 questions and answers with Jon Skeet
Your last line specifies that the value is in the local time zone of the system it's running in - but it's not really... it's converted using a different time zone. Basically DateTime is somewhat broken, in my view - which makes it hard... more 1/6/2014 8:21:42 AM
I'm guessing you're getting an ArrayIndexOutOfBoundsException due to your loop bounds: for(i =0; i <= Chatlength.length ; i++){ That should be: for (int i = 0; i < Chatlength.length; i++) { ... using a local variable... more 1/6/2014 7:54:00 AM
You've violated the contract of equals/hashCode basically: From the hashCode() docs: If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same... more 1/6/2014 6:55:45 AM
If no namespace is declared in the file, the source is in the "global" namespace. There's no namespace defaulting in C# as there is in VB. All "real" code really should be in a namespace though, for sanity. (I write toy, throwaway code... more 1/6/2014 6:50:53 AM
This is the problem, I believe. int bytesRemaining = fileSizeFromClient = totalBytesRead; That's doing two assignments, so you're assigning 0 to fileSizeFromClient immediately, and exiting the loop. You meant: int bytesRemaining =... more 1/6/2014 6:37:00 AM
toArray failing is only one symptom of you doing something fundamentally dangerous. From the documentation of LinkedList: If multiple threads access a linked list concurrently, and at least one of the threads modifies the list... more 1/6/2014 6:13:42 AM
The value of the attribute isn't changing - it's the same reference throughout the context's lifetime. When you increment the counter, that isn't changing the value of the attribute... it's just changing the data within the object that the... more 1/5/2014 8:44:56 PM
So when call BeginReceive, I need to provide a buffer of a predetermined size. In doing that, I end up with unused bytes in my buffer array. They all have the value of 0, so I am assuming that I can loop through the array and build a... more 1/5/2014 8:55:31 AM
These are the problem: public TagHandler tag { set; get; } public EditTag(TagHandler tag) The latter is a public method in a public class. Therefore all its parameters and its return type should be public too - otherwise you're saying... more 1/4/2014 11:43:21 PM
You just need to use | to combine multiple styles: label5.Font = new Font(label5.Font.Name, 12, FontStyle.Underline | FontStyle.Bold); more 1/4/2014 11:39:18 PM