This documentation is archived and is not being maintained.

Guid.NewGuid Method

Initializes a new instance of the Guid class.

[Visual Basic]
Public Shared Function NewGuid() As Guid
public static Guid NewGuid();
public: static Guid NewGuid();
public static function NewGuid() : Guid;

Return Value

A new Guid object.


This is a convenient static (Shared in Visual Basic) method that you can call to get a new Guid.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Guid Structure | Guid Members | System Namespace