ObjectGears Help

           
Forum   ObjectGears (Version: 1.6.0.0)

Script object Guid

This object offers functions for work with data type Guid.

Script functions

 

Name Description
Guid CreateNew() Function returns a new guid.
Guid Empty Function returns an empty guid.
bool IsEmpty( Guid guid) Function finds out if the input guid is empty.
Guid TryParseExact( string text, string format) Function converts text to guid. If the conversion fails, an empty guid is returned.

Function TryParseExact can use following formats "N", "D", "B", "P" or "X". These values correspond to .NET function Guid.TryParseExact (you can get more information in the .NET Framework documentation).

Object call

OG.Guid

Examples of call

This call returns a new guid.

var g = OG.Guid.CreateNew();

This call converts a text guid into a Guid object.

var g = OG.Guid.TryParseExact( 'A207E9FD-8994-4EF8-BBB2-9E2393B85E45', 'D');

This website is using cookies files to provide services and analyse visits. You agree with that by using this website.     Further information