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
[C#]
public static Guid NewGuid();
[C++]
public: static Guid NewGuid();
[JScript]
public static function NewGuid() : Guid;

Return Value

A new Guid object.

Remarks

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

Requirements

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

Show: