Fix Guid.TryParse to not throw FormatException
authorstephentoub <stoub@microsoft.com>
Mon, 22 Feb 2016 19:58:49 +0000 (14:58 -0500)
committertijoytom <tijoytom@gmail.com>
Tue, 23 Feb 2016 20:43:38 +0000 (20:43 +0000)
commitb000ff87f13ba9831b263cfb07d0b92efae99a8d
tree168b146ebe1f0df2434636f35bd4d561c8582d9a
parentcb27ed957cd230713064d3125dde55a5436fc62c
Fix Guid.TryParse to not throw FormatException

In certain situations, e.g.
```
Guid g;
Guid.TryParse("{0xdddddddd, 0xdddd, 0xdddd,{0xdd0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd}}", out g);
```
Guid.TryParse is throwing a FormatException rather than returning false.  This is due to a call to Convert.ToInt32 on one code path that's throwing.

Commit migrated from https://github.com/dotnet/coreclr/commit/73e596d0a44df010b6c66dc4f0a7342cb7955ee0
src/coreclr/src/mscorlib/src/System/Guid.cs