Browsing 7239 questions and answers with Jon Skeet
In the second code, you're synchronously waiting for the continuation to complete. In the first version, the method will return to the caller as soon as it hits the first await expression which isn't already completed. They're very... more 9/23/2013 5:26:59 PM
Just change your constants to be strings instead: private final static String ENDRECORD = "\r"; private final static String ENDLINE = "\n"; Then your existing concatenation should be fine. char would be fine too: private final static... more 9/23/2013 4:56:05 PM
and every time I pass the arguments to the parameter they will automatically be assigned to the global variables? No. There's nothing within Java which will make the "parameter to instance variable" (which isn't really "global")... more 9/23/2013 3:15:45 PM
Just use string concatenation explicitly by including a string literal: console.log(var1 + " " + var2); Or in a different situation where you didn't want the space, you could use: console.log(var1 + "" + var2); or perform the string... more 9/23/2013 3:12:51 PM
If all you want is to avoid the creation of a BOM, that's easy - just create a UTF8Encoding which doesn't use one and an XmlWriterSettings with that encoding: var path = Path.Combine(pathDesktop, "\\22CRE002.XPO"); var settings = new... more 9/23/2013 2:47:16 PM
StringWriter itself "advertises" (via the TextWriter.Encoding property) an encoding of UTF-16, so the XmlWriter detects that and modifies the XML declaration accordingly. You are actually writing out the data as UTF-8 - it's just that the... more 9/23/2013 2:33:57 PM
why do we need to provide a IFormatProvider object? what is the point behind it? It allows for culture-specific options. In particular: The format you use could be a standard date/time format, which means different patterns in... more 9/23/2013 2:15:59 PM
How to answer this or how to overcome this problem. Don't use fields in interfaces, or if you must use them, and they must have the same names, just fully qualify them: System.out.println(i3.x); Note that with import static, the... more 9/23/2013 10:20:56 AM
(After a conversation in comments.) It seems this is down to a difference in how console output is handled in your command line and in your IDE. These can behave very significantly differently in terms of auto-scrolling, size of buffer... more 9/23/2013 9:57:34 AM
You're calling the method, but then ignoring the results. You may want something like: foreach (var item in childObject.Disassemble<T>()) { yield return item; } I think you're a bit confused about what yield return does - it... more 9/23/2013 7:29:48 AM