My .Net .exe is used to read a file and store information in sql DB. On the dev system we had default setting and files in US locale and things were working fine.
I used the same .exe and deployed on to our Prod server where the default setting and files are in UK locale.
I have used the Datetime.Parse which should be parsing the date in the format of local system i.e for US MM/dd/yyyy and for UK dd/MM/yyyy.
But while parsing the date in UK format it gives an exception, Can someone help me out where am I doing wrong.
I also noticed something strange that when I changed the default setting of dev machine to UK and then compiled the .exe and deployed the same it worked.
Can you also let me know why did it worked.