Domanda

can we automatically assign a value on a Guid? like for example, i want this to be a value of my guid: "914aaa44-4e11-e311-96f7-d8d3855b1531"

is it even possible?

È stato utile?

Soluzione

if you want a new GUID every time use

Guid guid = Guid.NewGuid();

If you want a specific guid use (wrt your example)

Guid guid = new Guid("914aaa44-4e11-e311-96f7-d8d3855b1531");
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top