Browsing 7239 questions and answers with Jon Skeet
Because it has nothing to do with synchronization, i do not want to use wait/notify. It has everything to do with synchronization. Presumably your user interaction occurs on a different thread - so you're trying to synchronize signals... more 10/8/2013 5:33:00 PM
Your format string doesn't match your input data. Try a format string of "dd/MM/yyyy HH:mm:ss tt", and see the custom date and time format documentation for more information. Note that rather than catching an exception if it fails, you... more 10/8/2013 4:45:19 PM
Your first method looks okay, although we don't know what customResolver is. Your second method is a bit off. I'd suggest: public static DateTime ConvertToEasternTimeZoneFromUtc(DateTime utcDateTime) { var easternTimeZone =... more 10/8/2013 4:32:13 PM
I to know if it is possible to have an if statement in a method that will check the type of the generic used. Not in general, no - because of type erasure. Basically the type of T isn't known at execution time. You could use: if... more 10/8/2013 4:02:11 PM
That only makes a shallow copy. To make a deep copy, you'd want something like: bool[][] newMask = new bool[mask.Length][]; for (int i = 0; i < newMask.Length; i++) { newMask[i] = (bool[]) mask[i].Clone(); } From the docs for... more 10/8/2013 3:59:43 PM
This is quite possibly the issue: oStream.write(" Customer : Γειά σου\r\n".getBytes()); oStream.write(" ΚΩΔΙΚΟΣ : 00000234242\r\n".getBytes()); You're calling String.getBytes() with no encoding, to get a byte array using the... more 10/8/2013 3:20:06 PM
This looks to me as if the original type of the argument passed to the add method gets lost in the body of add. Well, type erasure means that Type won't be known at execution time, but that's not the immediate reason you're getting a... more 10/8/2013 3:15:56 PM
This is the problem: formatter = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss"); Look at your format in terms of the order of day, month and year - then look at your data. I believe you want: formatter = new SimpleDateFormat("yyyy-MM-dd... more 10/8/2013 3:01:54 PM
Well yes, it would. Look at your code: if (Items.Length != 0) GetId(Id, result, Items); Which part of that says that it should exit the method? It doesn't. It just calls GetId and completely ignores the result. Instead, you... more 10/8/2013 8:04:49 AM
You're just changing the value in the array. You happened to initialize that via dataRow["size"] but that doesn't mean there's any perpetual link between the two. If you need changes to be reflected back to the DataRow, I suspect you... more 10/8/2013 7:54:55 AM