How to solve “Could not establish trust relationship for the SSL/TLS secure channel with authority”

As a workaround you could add a handler to the ServicePointManager‘s ServerCertificateValidationCallback on the client side: but be aware that this is not a good practice as it completely ignores the server certificate and tells the service point manager that whatever certificate is fine which can seriously compromise client security. You could refine this and do some custom checking (for … Read more

Merging two arrays in .NET

If you can manipulate one of the arrays, you can resize it before performing the copy: Otherwise, you can make a new array More on available Array methods on MSDN.

Task vs Thread differences

Thread is a lower-level concept: if you’re directly starting a thread, you know it will be a separate thread, rather than executing on the thread pool etc. Task is more than just an abstraction of “where to run some code” though – it’s really just “the promise of a result in the future”. So as … Read more