Browsing 7239 questions and answers with Jon Skeet
There's no really simple way of fixing this, no. Depending on what thing_name does, however, you might approach things in a different way. If each implementation just returns a constant value, then it's effectively metadata about the... more 5/29/2015 3:42:17 PM
I cannot find the main method of my C# application A web site doesn't have a "main" method. It usually has global initialization hooks, but nothing quite like Main. It also looks like you've created a "Web Site" project rather than a... more 5/28/2015 5:05:46 AM
Each element in your array is just another string - so you need to parse each of those as well. For example: IList<Page> pages = jsonArray .Select(text => JObject.Parse(text)) .Select(p => new Page { ... }) ... more 5/26/2015 12:00:39 PM
You can't do that. There's simply no way of representing that in C# with your current approach. What you could do is have a bunch of classes each with a WriteLog method, in a sort sort of pattern which emulates Java enums to some extent.... more 5/26/2015 7:21:22 AM
The immediate benefit is that I can easily implement integration tests within the main application. Why would you want to do that? I don't see that as a benefit at all. Why would you want to deploy your tests when you deploy your... more 5/25/2015 10:32:39 AM
The simplest way would probably be to write it to the standard output (i.e. the console) of the "child" process. The "parent" process can then read the standard output (and error) of that process. See... more 5/25/2015 10:28:53 AM
I wouldn't think of it in terms of the method names - I'd think of it in terms of the URLs to start with: /api/meetings?date=... /api/meetings?startDate=...&endDate=... Think of it as a collection of meetings, and the query... more 5/25/2015 10:14:25 AM
You're getting an error because an out parameter has to be initialized in the method before you use it - it's initially unassigned. However, I don't think you want it to be an out parameter at all. You can just pass the existing reference... more 5/25/2015 7:25:44 AM
It sounds like you should be creating a separate class with a String field, an int field and a double field. Then you can create a map with that as the value type, and whatever type you like as a key. For example: Map<String,... more 5/25/2015 7:21:12 AM
Look at your method call: Player.update(); That's calling it as if it's a static method - on the type, rather than on an instance of the type. Which player do you want to update? You don't seem to have any instances of it... you should... more 5/23/2015 7:44:45 PM