Pergunta

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?

Foi útil?

Solução

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");
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top