System.Net.Http: missing from namespace? (using .net 4.5)

HttpClient lives in the System.Net.Http namespace. You’ll need to add: And make sure you are referencing System.Net.Http.dll in .NET 4.5. The code posted doesn’t appear to do anything with webClient. Is there something wrong with the code that is actually compiling using HttpWebRequest? Update To open the Add Reference dialog right-click on your project in Solution Explorer and select Add Reference…. It should look something like:

C# Java HashMap equivalent

Dictionary is probably the closest. System.Collections.Generic.Dictionary implements the System.Collections.Generic.IDictionary interface (which is similar to Java’s Map interface). Some notable differences that you should be aware of: Adding/Getting items Java’s HashMap has the put and get methods for setting/getting items myMap.put(key, value) MyObject value = myMap.get(key) C#’s Dictionary uses [] indexing for setting/getting items myDictionary[key] = value MyObject value = myDictionary[key] null keys Java’s HashMap allows null keys .NET’s Dictionary throws an ArgumentNullException if you try … Read more

What does plus equals(+=) operator means here?

This question already has answers here:+= operator with Events (6 answers)Closed 7 years ago. I was working out sample code of Windows phone and often I see statements with += operator. I know about add assignment operator which does the below operation But this is new to me Here how does += works?

WCF vs ASP.NET Web API

The new ASP.NET Web API is a continuation of the previous WCF Web API project (although some of the concepts have changed). WCF was originally created to enable SOAP-based services. For simpler RESTful or RPCish services (think clients like jQuery) ASP.NET Web API should be good choice.

how does Request.QueryString work?

The HttpRequest class represents the request made to the server and has various properties associated with it, such as QueryString. The ASP.NET run-time parses a request to the server and populates this information for you. Read HttpRequest Properties for a list of all the potential properties that get populated on you behalf by ASP.NET. Note: not all properties will be … Read more