QuickZ
QuickZ
CC#
Created by QuickZ on 1/8/2023 in #help
❔ Is there a way to access a prop with the help of a string.
Is there a way to access a prop with the help of a string. Like you do in JS like this myObject["propName"]; ?
16 replies
CC#
Created by QuickZ on 10/24/2022 in #help
TestInitialize runs after constructor causing nullable warnings
I am using the [TestInitialize] attribute on a method to run code only once per complete testrun, and in there initialise your Mocks. This will lead to that you will get the kinda new nullable warnings since this is not run in the constructor. And if you have fields that are not instantiated in the constructor then the intellisense will pick it up as you are exiting the constructor with unasigned fields just having null (this is however the design and accepted). Is there a recommended way of avoiding these warnings?
2 replies