generating GUID without hyphen

Note that you are talking about the (canonical) string representation of a Guid. The Guid itself is actually a 128-bit integer value.

You can use the “N” specifier with the Guid.ToString(String) overload.

Guid.NewGuid().ToString("N");

By default letters are lowercase. A Guid with only uppercase letters can only be achieved by manually converting them all to uppercase, example:

Guid.NewGuid().ToString("N").ToUpper();

A guid with only either letter or digits makes no sense. A guid string representation is hexadecimal, and thus will always (well most likely) contain both.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)