Skip to content

Commit 1b6a099

Browse files
authored
Merge pull request #1785 from oldnewthing/oldnewthing-patch-1
A better way to create (and compare) GUIDs
2 parents a1f0476 + adea352 commit 1b6a099

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/cppcx/platform-guid-value-class.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public value struct Guid
3030
3131
### Remarks
3232
33-
For an example of how to generate a new `Platform::Guid` using the Windows function [CoCreateGuid](/windows/desktop/api/combaseapi/nf-combaseapi-cocreateguid), see [WinRT component: How to generate a GUID?](https://www.eternalcoding.com/?p=383)
33+
To generate a new `Platform::Guid`, use the [Windows::Foundation::GuidHelper::CreateNewGuid](/uwp/api/windows.foundation.guidhelper.createnewguid#Windows_Foundation_GuidHelper_CreateNewGuid) static method.
3434
3535
### Requirements
3636
@@ -134,6 +134,11 @@ The second `Platform::Guid` to compare.
134134

135135
True if the two `Platform::Guid` instances are equal.
136136

137+
### Remarks
138+
139+
Prefer using the `==` operator instead of the
140+
[Windows::Foundation::GuidHelper::Equals](/uwp/api/windows.foundation.guidhelper.equals) static method.
141+
137142
## <a name="operator-inequality"></a> Guid::operator!= Operator
138143

139144
Compares two `Platform::Guid` instances for inequality.

0 commit comments

Comments
 (0)