Why is it that following code gives me a NullReferenceException when I run the application, a commandline c# application, with arguments? The arguments are valid and args[0] contains the text I'm trying to pass. Also, that Main's class is set as startup
object. Peer.Room is also a string. Length is 1.
static void Main(string[] args) { if (args.Length > 0) { Peer.Room = args[0]; } }
The strangest thing of all is that it worked some days ago and I changed not a single bit.
It suddenly stopped working.
Could someone nice help me please to find a way to fix this?
I really don't want to recompile my application 23 times just so I have a different version for every room...