Browsing 7239 questions and answers with Jon Skeet
At execution time, your string contains a backslash character followed by an n. They're encoded exactly as they should be. If you actually want a linefeed character, you shouldn't be escaping the backslash in your code: Byte[] bytes = new... more 12/20/2016 10:32:36 AM
Don't run it from the obj\Debug directory - the obj directory is basically temporary build artefacts. Instead, run it from the bin\Debug directory, where you'll find all the dependencies (in this case Newtonsoft.Json.dll) are present as... more 12/20/2016 9:54:03 AM
EventHandler<T> is just a generic EventHandler type, which avoids you having to declare a new delegate type for each kind of EventArgs you want to use. Consider Control.KeyPress for example. It's declared as an event of type... more 12/20/2016 9:50:49 AM
There's nothing in C# as a language that's equivalent to IN, no... but you can achieve a similar effect easily. The simplest approach is to probably to use System.Linq and Contains against an array: using System; using... more 12/18/2016 2:25:20 PM
You're passing an inappropriate value to DriverManager.getConnection. It's meant to be a JDBC URL - you're just passing in a class name. The JDBC URL for SQLite would be something like "jdbc:sqlite:/home/leo/work/mydatabase.db" more 12/17/2016 9:14:33 PM
No, there's no way of using nameof for a generic type (or a member of that generic type) without specifying a type argument. I would personally like to be able to specify the open type as you can with typeof, i.e. // Would be nice, but... more 12/17/2016 8:59:50 PM
You're assuming that the Class-Path refers to jar files within the jar file. It doesn't work that way. From "Adding classes to the JAR file's classpath": Note: The Class-Path header points to classes or JAR files on the local network,... more 12/16/2016 1:19:15 PM
Nothing's being corrupted by your download - it's simply Facebook deciding (sometimes, which is odd) that it doesn't want to serve the image to your client. It looks like it's the lack of a user agent that causes the problem. All you need... more 12/16/2016 8:47:17 AM
Just omit the "para" argument from Descendants() - that will obtain all the descendant elements. You can then call Attributes() (which in this case is an extension method on IEnumerable<XElement>) to obtain all the attributes from... more 12/16/2016 7:05:59 AM
Yes, you specify it on each member. Two good things about this: Moving the methods around within the same class can't affect anything. You can immediately see the access modifier by looking at the method declaration. No need to look... more 12/15/2016 4:55:36 PM