473,386 Members | 1,821 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,386 software developers and data experts.

Generate GUID

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/
Nov 22 '05 #1
3 6366
"Jeff Lynch" <je********@houston-lynch.com> schrieb
How do I create a new GUID programatically like the "Create Guid" tool
does
in VS.NET?


Hi Jeff,

use NewGuid() of the System.Guid-Structure.

[C#]
Guid g = Guid.NewGuid();

[VB.NET]
Dim g as Guid = Guid.NewGuid()

http://msdn.microsoft.com/library/en...classtopic.asp

Cheers

Arne Janning
Nov 22 '05 #2
Thanks!

--
Jeff Lynch
"A BizTalk Enthusiast"
http://dotnetjunkies.com/WebLog/jlynch/

"Arne Janning" <sp*****************@msn.com> wrote in message
news:OF**************@tk2msftngp13.phx.gbl...
"Jeff Lynch" <je********@houston-lynch.com> schrieb
How do I create a new GUID programatically like the "Create Guid" tool
does
in VS.NET?


Hi Jeff,

use NewGuid() of the System.Guid-Structure.

[C#]
Guid g = Guid.NewGuid();

[VB.NET]
Dim g as Guid = Guid.NewGuid()

http://msdn.microsoft.com/library/en...classtopic.asp

Cheers

Arne Janning

Nov 22 '05 #3
Thanks!

--
Jeff Lynch
"A BizTalk Enthusiast"
http://dotnetjunkies.com/WebLog/jlynch/

"Arne Janning" <sp*****************@msn.com> wrote in message
news:OF**************@tk2msftngp13.phx.gbl...
"Jeff Lynch" <je********@houston-lynch.com> schrieb
How do I create a new GUID programatically like the "Create Guid" tool
does
in VS.NET?


Hi Jeff,

use NewGuid() of the System.Guid-Structure.

[C#]
Guid g = Guid.NewGuid();

[VB.NET]
Dim g as Guid = Guid.NewGuid()

http://msdn.microsoft.com/library/en...classtopic.asp

Cheers

Arne Janning

Nov 22 '05 #4

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

Similar topics

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: Mullin Yu | last post by:
hi, i have a web service that has file operations on Windows OS, and there may be a file concurrency issue if only one working directory e.g. c:\working therefore, i want to have a unique sub...
26
by: John Grandy | last post by:
Is it possible to generate a 20 byte integer from a GUID that is "unique enough" ( just like a GUID is not truly unique , but is "unique enough" ). We identify transactions with GUIDs , but a...
10
by: Crirus | last post by:
Is there a function that return some random ID like string alphanumeric? Like this: A35sDsd1dSGsH Thanks Crirus
2
by: Chris Dunaway | last post by:
I have a web service which is accessed by a windows forms application. When the application submits a unit of work (a "job"), I want to return a job receipt or tracking number back to the...
5
by: Jason L James | last post by:
Hi all, is there a method or property of a class that will return a GUID in VB.NET that I can use as the PK of my DB. I do not want SQL to generate it as I can not then use SELECT...
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...
16
by: Mark S. | last post by:
I'm a fan of the GUID, but the current project is looking to use a genuinely unique integer. Does the following do that? Math.Abs(System.Guid.NewGuid().GetHashCode()) TIA
6
by: =?Utf-8?B?QWxwaGFwYWdl?= | last post by:
Hello, I want to generate a unique ID for each page of my Asp.Net application. My first step is to generate a new Guid when the page is loaded for the first time and registers, stores this new...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.