Frage

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?

War es hilfreich?

Lösung

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");
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top