string hasNothing = null; Console.WriteLine(hasNothing.Length);These kind of erros are usually easy to detect. The stack trace is usefull in order to detect the error causes as well, but the stack trace you have on your message doesn't seem to be complete. Could you please verify if you have more information provided on the stack trace?