Saturday, April 18, 2020

HttpWebRequest, String.Join and formatting code

Weekly wrap:

1. When you work with Visual Studio 2010 you are grateful for posts such as this on Stack Overflow.

I needed to make post request using .NET framework 4.0. In the top rated answer, the methods C and D work with .NET framework 2.0+

I ended up using the Method C which used HttpWebRequest


2. Actually working with C# I had never used String.Join() before. In fact, I knew about python's .join() routine before C#. In the language of python, there is definitely a push by the programmers and by the creators to write as little code as possible (they call it pythonic). But even C# has a similar routine and I think it is pretty useful:



3. By the way I formatted the above code using gists on github. More info in this SO post


No comments:

Post a Comment