Browsing 7239 questions and answers with Jon Skeet
No, it's not a union. The simplest approach is to check whether there's anything in listB which isn't in listA: var result = !listB.Except(listA).Any(); In other words, if you took everything from listA away from listB, would there be... more 8/14/2014 6:44:17 PM
Method arguments are always completely evaluated before the method is called. So this line: System.out.println("testing" + b.getH()); is evaluated as: String lhs = "testing"; String rhs = b.getH(); String argument = lhs +... more 8/14/2014 4:21:38 PM
As you say, you're not drilling down to the Barcodes element under OrderItem. Don't forget that el will refer to an Order element, but you want the Order -> OrderItems -> OrderItem -> Barcodes -> Barcode element. I suspect you... more 8/14/2014 3:14:36 PM
If you use LINQ to JSON it's simple, because JObject allows you to iterate over all the key/value pairs - it implements IEnumerable<KeyValuePair<string, JToken>>: using System; using System.IO; using... more 8/14/2014 12:34:23 PM
Your GetPageAsString method is broken, basically - it's assuming that the encoding is UTF-8, as that's what StreamReader uses by default. I would strongly urge you to avoid performing the string decoding yourself. In order of preference... more 8/14/2014 10:55:52 AM
I strongly suspect that this: correctCount1 > 1 || correctCount1 == 0 ? "s" : incorrectCount1 should be: correctCount1 > 1 || correctCount1 == 0 ? "s" : "", incorrectCount1 After all, you don't really want it to say: "You have... more 8/14/2014 10:28:32 AM
Therefore I need to translate the java simple date format pattern into the oracle pattern No, you don't. You should instead use a PreparedStatement, and call setDate or setTimestamp on it to specify the value you're interested... more 8/14/2014 8:29:24 AM
I would return null (just as a byte[] - all arrays are reference types). Returning an empty array will lead the caller to think they can try to load that data as an image - which they can't. Returning a null reference makes it very easy to... more 8/14/2014 7:28:40 AM
You haven't said which server you're using, but typically an application server has multiple classloaders involved - some shared, and some per-application. The Tomcat documentation has a good explanation of its classloaders, for... more 8/14/2014 6:19:31 AM
So I can imagine that Linq is calling GetEnumerator() many times No, that's not the case. The problem is in your implementation of IEnumerable, notably here: public IEnumerator<Person> GetEnumerator() { return... more 8/13/2014 8:38:48 PM