How does ordered dictionary work with integer keys ?

Does ordered dictionary only need to have string variables as keys or can It have any type of keys ? Console.WriteLine(“Hello World!”); OrderedDictionary d2 = new OrderedDictionary(); d2.Add(1, 114); d2.Add(2, 223); d2.Add(3, 335); Console.WriteLine(d2[0]); // gives 114 as output Console.WriteLine(d2[1]); // gives 223 as output Console.WriteLine(d2[3]); // gives error so, if we have integer keys […]

How often do you guys use the builder pattern?

Recently I switched onto a Java project and one of the first things I noticed was the heavy use of builders. Basically, something like this: Person person = Person.builder().firstName(“John”).lastName(“Smith”).build() whereas in c#: Person person = new Person { FirstName = “John”, LastName = “Smith” }; I was wondering if anybody actually uses the first pattern […]

Using an API with C# no errors but no results either. Help….

I’m Following this guide and I have got all errors removed but the button is still not showing. The following is my code (No errors in visual studio, builds error free): using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Autodesk.Revit.UI; using Autodesk.Revit.DB; using System.Windows.Media.Imaging; using System.Reflection; namespace Walkthrough { /// /// This […]