I'm develop an application using ASP.NET in c#, and I hit the following error:
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
and this is my code fragment:
Match matchNew = Regex.Match(parts[0].ToString(), @"([0]\.\d*)|[1]\.[0]$", RegexOptions.IgnoreCase);
It was testing in my local the code was perfectly fine, but it hit this error when moved the same code to my virtual environment.
I'm guessing maybe it is due to the dot net framework in my virtual environment.
Please help and thank you in advanced.