ICooper, Alright #dotnet hive mind. A question around primary constructors. I just had an issue where the primary constructor took two values:
public class Foo(string bar, Dictionary<string, string> baz)
and then i tried to use them in a method body
public async Task DoStuff(){
var result = DoTheThing(bar);
var value = DoTheOtherThing(result, baz);
}
I created an instance, passed in valid values - but in DoStuff they were null?
What am I missing?
Add comment