Why does this Dictionary intialiser throw an exception?

The following code throws this exception with message: An item with the same key has already been added. but yet, no two keys are the same: using System; using System.Collections.Generic; public class Program { public static void Main() { Console.WriteLine(“Minimal example ” + testclass.modeLookUp[“i”]); } public static class testclass { public static Dictionary<string, int> modeLookUp […]

Issue with HttpClient in netcore

I am trying to use an API exactly like how the original client does, which is written in Java. It was going very well until I started adding the headers. (Please keep in mind, the target is netcoreapp 2.1) Here is an example; Java C# HttpClient / HttpWebRequest Accept-Language: en-US;q=1, en;q=0.9 Accept-Language: en-US; q=1.0, en; […]

New to C# and Web Services. Trying to loop through a fixed list and add a pause between each request.

I would like to find a way to loop through a fixed list of numbers(23,27,28,33,42,55,65,77,80,82,91,94) in parameter 2 and wait between each request. Any help/Suggestions? Thank You!! /// <summary> /// Execute a Soap WebService call /// </summary> public override void Execute() { HttpWebRequest request = CreateWebRequest(); XmlDocument soapEnvelopeXml = new XmlDocument(); soapEnvelopeXml.LoadXml(@”<?xml version=””1.0″” encoding=””utf-8″”?> <soap:Envelope […]