C# Accessing a dictionary from another class is not working
问题 I'm fairly new to C# and have been trying to learn for the last 3 days. I am curious as to why the below code is not working properly? I get the following error: Object reference not set to an instance of an object. when I try to call data.dOffsets["roomtargets"]. However, calling data.sProcessName does work without any error.. I have two classes/files. The program.cs: class Program { public static Data data = new Data(); static void Main(string[] args) { Console.WriteLine("data.sProcessName: