public void TimeGenerateVsNewGuid() { string generatedId; TimeSpan generateTime = Exec.Time(() => { generatedId = ServiceProxySystem.GenerateSecureRandomString(); }); string guid; TimeSpan guidTime = Exec.Time(() => { guid = Guid.NewGuid().ToString(); }); string sha256; TimeSpan guidTimeSha256 = Exec.Time(() => { sha256 = Guid.NewGuid().ToString().Sha256(); }); Message.PrintLine("Generate took: {0}", generateTime.ToString()); Message.PrintLine("-NewGuid took: {0}", guidTime.ToString()); Message.PrintLine("HashGuid took: {0}", guidTimeSha256.ToString()); }