Browsing 7239 questions and answers with Jon Skeet
You're trying to return a Byte[] from the call - but InputStream.read(byte[]) returns the number of bytes read, and stores the data in the byte array referenced by the parameter. So you'd need something like: doAnswer(new... more 6/17/2014 1:44:06 PM
This is specified in JLS section 3.10.1, which has different rules for decimal literals and literals of other bases: It is a compile-time error if a decimal literal of type int is larger than 2147483648 (231), or if the decimal literal... more 6/17/2014 1:39:24 PM
As documented, getNameCount() returns: the number of elements in the path, or 0 if this path only represents a root component So in your case, the elements are "Users", "Heather", "Desktop", "Testing" and "Testing2" - not the names... more 6/17/2014 1:23:59 PM
The difference is between whether you do the multiplication first or the division first - and what the types of those operations are. This: (x - 32) * 5 / 9 is equivalent to: ((x - 32) * 5) / 9 So if the type of x is double, then... more 6/17/2014 12:41:26 PM
The problem is with the last argument to Tuple.Create. Look carefully at how the argument return value is defined: public static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8>> Create<T1, T2, T3, T4, T5, T6, T7, T8>( ... more 6/17/2014 12:29:06 PM
I suspect the problem is that your calls within the loop (when you call mockStatement.executeUpdate(expected)) match your earlier mock of when(mockStatement.executeUpdate(anyString())). Remember that the way the mock knows what you're... more 6/17/2014 11:44:04 AM
All your methods are being called virtually, with overrides applying. So this code in F: public void increase() { upA(); } ... is invoking G.upA(), because the object it's calling upA() on is an instance of G. So the execution... more 6/17/2014 11:36:47 AM
System is just the namespace which contains the Console type. You almost certainly have a using directive like this in your code: using System; That imports every type within the namespace, so you can refer to it by its simple name.... more 6/17/2014 9:35:37 AM
While I wouldn't want to do this (and I'd need persuading that the cost of boxing is really going to be significant), you could have your multiple stores and have a variable of type Dictionary<object, T> in your method - that way I... more 6/17/2014 8:50:03 AM
You're creating a new ObservableCollection<VLANSPropertyClass>(), but it's empty. Therefore when you iterate over it, you never end up in the body of the loop. You need to populate your collection somewhere, before it's useful to... more 6/17/2014 8:42:05 AM