Praveen wrote:
I'm using Guid.NewGuid() for generate unique ID
will there be 4 '-' alway in guid?
I assume you mean if you call ToString() on the generated Guid. In that
case, the answer is yes. The format of the string returned by
guid.ToString() is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. As you can see,
four '-' characters in that string. However, the ToString method is
overloaded. If you pass "N" into ToString you'll get back a string of 32
digits with no hyphens. The format returned by ToString() is the same as
the format returned of you call the overload that takes a format specifier
and passing "D" as the format string - ToString("D").
See
http://msdn2.microsoft.com/en-us/lib....tostring.aspx for
the various overloads of the ToString method. Browse into any of the
overloads that take in a format string to see the different formats that
could be returned.
--
Tom Porterfield