Generate alphanumeric numbers in MVC5

0

I have an application in mvc 5 asp.net and I would like to generate an alphanumeric number automatically example of result I want: B0100002062 and that will increase as I insert records, I would appreciate the contribution

    
asked by Ing. Jose Valera 29.06.2018 в 17:55
source

1 answer

0

What you need is to make a GUID, this is a unique identifier that contains a random alphanumeric string.

To do this use the following

using System.Guid

var x = Guid.NewGuid();
Console.WriteLine(x);

this should create a guid like this 285f320f-892f-4e09-9d25-14c717e0dfd2

You can review the same example by clicking here to find out more about this, visit official documentation I hope that you have managed to help. Greetings.

    
answered by 29.06.2018 в 18:04