GUID?

  • Thread starter Thread starter LL
  • Start date Start date
There a Guid object that you have to instantiate and call
it's NewGuid method.

(in C#)
Guid g = new Guid();
g = g.NewGuid();

HTH,
Suresh.
 
Actually, NewGuid is a static method so you can't do that.

Instead try
Guid g = Guid.NewGuid();

Hope this helps
Brian W
 
It is not necessary to create an instance of the Guid class to invoke the
NewGuid() method. It's a static (shared) method. You can simply call:

Guid g = Guid.NewGuid();

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
 
This should be relatively easy. Here's a C# sample:

System.Guid myGUID = System.Guid.NewGuid();
Response.Write(myGUID.ToString());
 
Back
Top