Browsing 7239 questions and answers with Jon Skeet
You should change to use a different overload of XmlWriter.StartElement. For example: _writer.WriteStartElement("link", "http://www.w3.org/1999/xhtml"); That assumes you've already got a prefix alias of xhtml for the namespace... more 8/4/2014 12:34:46 PM
Your address field within Address has no access modifiers - therefore it is only available to classes in the same package. Your EmployeeA class is not in the same package (it has no package statement), therefore it can't see it. You could... more 8/4/2014 12:21:41 PM
I would suggest using LINQ to group and count them: // TODO: Build up the whole string, and set the Text property once. // Oh, and rename richTextBox1 to something more descriptive. foreach (RunePage rune in runePages) { if... more 8/3/2014 7:06:17 PM
This is problematic: return Encoding.ASCII.GetString(...); The result of encryption is arbitrary binary data. Do not try to convert it into a string like that - you'll almost always lose data. Instead, either just return the encrypted... more 8/2/2014 9:07:08 PM
The javadoc specifies the required format for Duration.parse: Parses a Duration from the specified string. This parses the format PTa.bS, as per AbstractDuration.toString(). You'll need to build a custom formatter - here's some... more 8/2/2014 7:35:09 PM
You're compiling without specifying a output "root" for the compiler to build up a package hierarchy from - so it just puts the class files in the same directory as the source files. Then it tries to find the classes later on, but it can't... more 8/2/2014 6:24:55 PM
Right, it sounds like you want something like: DateTime startOfDay = DateTime.UtcNow.Date; var results = context.Orders .OrderBy(x => x.Schedule < startOfDay) .ThenBy(x =>... more 8/2/2014 2:45:05 PM
I suspect you're trying to find cases where it isn't "true" and it isn't "false". So something like: if (spawnMonster.Text != "true" && spawnMonster.Text != "false") { error++; } Alternatively, express the condition once,... more 8/2/2014 9:18:10 AM
This is the key (example from readInts) * @deprecated For more consistency, use {@link #readAllInts()} The methods are deprecated, which means you should stop using them. more 8/2/2014 6:49:32 AM
replaceAll uses regular expressions, and bracket have a particular meaning in regular expressions. Just use replace instead, which doesn't use regex: text = text.replace(",)", ")"); more 8/1/2014 8:08:55 PM