473,410 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

Guid.NewGuid '-' character

I'm using Guid.NewGuid() for generate unique ID
will there be 4 '-' alway in guid?

thanks,
Praveen
Dec 8 '06 #1
5 3679

You would really benefit from reading:

http://en.wikipedia.org/wiki/Guid

You'll notice there are/were different types of UID's.

cbmeeks
http://www.codershangout.com
Praveen wrote:
I'm using Guid.NewGuid() for generate unique ID
will there be 4 '-' alway in guid?

thanks,
Praveen
Dec 8 '06 #2
Thanks for your help.
I prefer to know about C# GUID.
thanks,
praveen

"cbmeeks" <cb*****@gmail.comwrote in message
news:11**********************@73g2000cwn.googlegro ups.com...
>
You would really benefit from reading:

http://en.wikipedia.org/wiki/Guid

You'll notice there are/were different types of UID's.

cbmeeks
http://www.codershangout.com
Praveen wrote:
>I'm using Guid.NewGuid() for generate unique ID
will there be 4 '-' alway in guid?

thanks,
Praveen

Dec 8 '06 #3
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

Dec 8 '06 #4
Hi Praveen,

Do you think this post can be closed?
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Dec 13 '06 #5
Walter Wang [MSFT] wrote:
Hi Praveen,

Do you think this post can be closed?
Wouldn't that be a question you should post to the original author of the
thread, not some who provided an answer? I don't know if the information I
provided satisfies his question or not.

Also understand that this is NNTP, the concept of closing a post is not
relevant. There may be internal MS tools where you track these things, but
since you use the same newsgroups for your managed MSDN newsgroups as your
public NNTP groups, in the latter context your question makes no sense.
--
Tom Porterfield

Dec 13 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tom L | last post by:
How can I create a guid value in vb.net? I'm creating a sql procedure, and I want to pass the new guid value over to SQL instead of SQL creating it. thx
2
by: Jeff Lynch | last post by:
How do I create a new GUID programatically like the "Create Guid" tool does in VS.NET? -- Jeff Lynch "A BizTalk Enthusiast" http://dotnetjunkies.com/WebLog/jlynch/
6
by: Jim Heavey | last post by:
When I use the new(Guid), the GUID which is generated is all zeros. Is there a technique for the system to assign a real Guid? Do I have to manually calculate a GUID?
9
by: Rene | last post by:
I am using the Guid.Empty value ("00000000-0000-0000-0000-000000000000") to represent a special meaning. The problem is that I don't know if there is a chance that a command like...
4
by: LL | last post by:
Hi, What's is function to get the GUID? Thanks,
5
by: George | last post by:
I want to create a unique id for each of a set of objects. These ids may be generated on multiple machines simultaneously and must all be different to each other. There are an undefined number...
2
by: Gary Dunne | last post by:
Is there a built in function for creating a Guid in VB .Net ? I know about the CoCreateGuid API call, but I though that maybe it's been built in to .Net ? I've found the GUID class and tried ...
1
by: Scott M. Lyon | last post by:
I've got a stored procedure that takes a few parameters as input parameters, and one output parameter (a uniqueidentifier). After the stored procedure call, I need to return that output parameter...
1
by: Scott M. Lyon | last post by:
I've got a stored procedure that takes a few parameters as input parameters, and one output parameter (a uniqueidentifier). After the stored procedure call, I need to return that output parameter...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.