Browsing 7239 questions and answers with Jon Skeet
It sounds like you need ClientInformation to be a public class - just give it an internal constructor, preventing instantiation from elsewhere. more 1/26/2017 10:03:59 PM
The scope of the repo variable (in your first case) is the using statement. You can't refer to it outside the using statement, because it's declared in there. We can't tell the scope of the result variable because you haven't shown its... more 1/25/2017 6:01:12 PM
It's simple: > has higher precedence than ^, so if (true ^ 1 > 0) { is equivalent to if (true ^ (1 > 0)) { which is equivalent to if (true ^ true) ... which is just logical XOR. I would never write code like this, mind... more 1/25/2017 2:55:27 PM
You're never asking for a response, so it's not making the request. Just add: using (var response = request.GetResponse()) { // Use the response } Note that your "get" code isn't exception-safe - it should use using statements... more 1/25/2017 9:12:51 AM
Well that's not the name of a Nuget package any more, as far as I can tell. I believe you want the KendoUICore. Based on the versions of that - which include 2016.3.1118 - I suspect that temporarily had the name... more 1/24/2017 8:20:56 AM
I suspect this may be the problem: afiPart.setBinaryData(html.getBytes()); That will use the platform-default encoding - which could clearly differ between your local machine and your server. I would strongly encourage you to always... more 1/23/2017 11:13:26 AM
The exception isn't thrown within the method you've shown - you're basically returning a query to the caller, and that query is then failing. One option would be to force the query to execute immediately by calling ToList(). That way, any... more 1/22/2017 5:48:29 PM
Well that's a way of doing it, certainly - but LINQ makes it a lot easier, as this is precisely the kind of thing it's designed for. You want a pipeline that: Splits the original string into substrings Converts each string into an... more 1/22/2017 9:28:24 AM
You can only pass an argument by reference with ref if the parameter is a ref parameter as well. AddWithValue doesn't have any ref parameters, so you can't use it that way. Note that you have to specify ref when calling a method if a... more 1/21/2017 9:33:46 AM
Basically, don't use a tool oriented at JSON to construct XML. If you already had JSON, it would make sense to use Json.NET to convert it to XML - but as you're building it from scratch, it's much cleaner to use LINQ to XML: XDocument doc... more 1/20/2017 9:00:20 AM