473,395 Members | 1,403 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,395 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 6367
"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: 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
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...
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:
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
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...

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.