Guid.Parse() or new Guid() - What's the difference?

后端 未结 5 1464
悲哀的现实
悲哀的现实 2020-12-29 19:24

What is the difference between these two ways of converting a string to System.Guid? Is there a reason to choose one over the other?

var myguid          


        
5条回答
  •  自闭症患者
    2020-12-29 19:43

    In .Net framework v1.1 exists only 1 way -> var myguid = new Guid("9546482E-887A-4CAB-A403-AD9C326FFDA5");

    Guid.Parse became available later.

提交回复
热议问题