+
+#if NET_4_0
+
+ /*
+ N = new Guid ("000102030405060708090a0b0c0d0e0f");
+ D = new Guid ("00010203-0405-0607-0809-0a0b0c0d0e0f");
+ B = new Guid ("{00010203-0405-0607-0809-0A0B0C0D0E0F}");
+ P = new Guid ("(00010203-0405-0607-0809-0A0B0C0D0E0F)");
+ X = new Guid ("{0x00010203,0x0405,0x0607,{0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f}}");
+
+ string expected = "00010203-0405-0607-0809-0a0b0c0d0e0f";
+ */
+
+ [Test]
+ public void ParseExact ()
+ {
+ const string expected = "00010203-0405-0607-0809-0a0b0c0d0e0f";
+
+ var guid = Guid.ParseExact ("000102030405060708090a0b0c0d0e0f", "N");
+ Assert.AreEqual (expected, guid.ToString ());
+
+ guid = Guid.ParseExact ("00010203-0405-0607-0809-0a0b0c0d0e0f", "D");
+ Assert.AreEqual (expected, guid.ToString ());
+
+ guid = Guid.ParseExact ("00010203-0405-0607-0809-0a0b0c0d0e0f", "d");
+ Assert.AreEqual (expected, guid.ToString ());
+
+ guid = Guid.ParseExact ("{00010203-0405-0607-0809-0A0B0C0D0E0F}", "B");
+ Assert.AreEqual (expected, guid.ToString ());
+
+ guid = Guid.ParseExact ("{00010203-0405-0607-0809-0A0B0C0D0E0F}", "b");
+ Assert.AreEqual (expected, guid.ToString ());
+
+ guid = Guid.ParseExact ("(00010203-0405-0607-0809-0A0B0C0D0E0F)", "P");
+ Assert.AreEqual (expected, guid.ToString ());
+
+ guid = Guid.ParseExact ("{0x00010203,0x0405,0x0607,{0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f}}", "X");
+ Assert.AreEqual (expected, guid.ToString ());
+
+ guid = Guid.ParseExact ("\t {\t 0x00000001 , 0x0002 , \t 0x0003 \t , { 0x04 , 0x05 , \t 0x06\t,\t0x07 , 0x08 , 0x09 , 0x0a , 0x0b } \t }\t ", "X");
+ Assert.AreEqual ("00000001-0002-0003-0405-060708090a0b", guid.ToString (), "#8");