I'm new to C #. I'm trying to make a very simple HTTP communication sample, and I'm stumbling on the first step, and I'd appreciate it if you could help.
As shown in the attached image, I get an error if WebRequest and WebResponse are not found in the System.Net namespace. What should I do?
I added System.Net in the project's reference settings, but according to the content of the error message, this doesn't seem to be the case.
I looked it up on the internet, but I didn't understand it well, so I would appreciate it if you could give me some advice.
The environment is "Visual Studio 2019 Version 16.8.2" ".NET Framework 4.7.2".
Answer # 1
I will post the content of your comment here.
It seems that an error occurred because it was created with "empty project", and when I created the project with "console app", no error occurred.
Also, it seems that Microsoft does not recommend using WebRequest for new development, and I received information that it seems better to use HttpClient.
- c # - error "nullreferenceexception: object reference not set to an instance of an object"
- i want to fix the error in the c # calculator convert part
- c # - error when creating unity class
- c # - compile error when importing oculus integration in unity 20194
- c # - i get an error in the if statement
- c # - in unity, i want to attach a reference object from a script to an instantiated prefab
- c # - the error occurs only after building openfiledialog in unity
- c # - error moving object by dragging
- c # - [unity] object reference not set to an instance of an object error resolution
- c # - i don't understand why the (int) of the if statement written in the reference book is necessary
- c # - mstest library file name is too long and build error
- c # - about error when using social connector in unity
- c # - code error of script implemented by unity cannot be resolved
- c # - what to do about the error message "index is out of array bounds"
- unity c # error code indexoutofrangeexception: index was outside the bounds of the array
- c # - what does the error "argumentexception: method return type is incompatible" mean?
- xml - xcode error "reference to generic type'dictionary' requires arguments in "
- c # - in a script? error cs1056: unexpected character'?' is displayed even though there is no