Skip to content

Commit 400ca22

Browse files
authored
Merge pull request #36962 from dotnet/main
Merge to Live
2 parents 7654b52 + db3c949 commit 400ca22

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

aspnetcore/grpc/protobuf.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: jamesnk
44
description: Learn how to create Protobuf messages for .NET apps.
55
monikerRange: '>= aspnetcore-3.0'
66
ms.author: wpickett
7-
ms.date: 02/12/2021
7+
ms.date: 04/07/2026
88
uid: grpc/protobuf
99
---
1010
# Create Protobuf messages for .NET apps
@@ -107,12 +107,12 @@ The generated properties in the C# class aren't the .NET date and time types. Th
107107
// Create Timestamp and Duration from .NET DateTimeOffset and TimeSpan.
108108
var meeting = new Meeting
109109
{
110-
Time = Timestamp.FromDateTimeOffset(meetingTime), // also FromDateTime()
110+
Start = Timestamp.FromDateTimeOffset(meetingTime), // also FromDateTime()
111111
Duration = Duration.FromTimeSpan(meetingLength)
112112
};
113113

114114
// Convert Timestamp and Duration to .NET DateTimeOffset and TimeSpan.
115-
var time = meeting.Time.ToDateTimeOffset();
115+
var time = meeting.Start.ToDateTimeOffset();
116116
var duration = meeting.Duration?.ToTimeSpan();
117117
```
118118

0 commit comments

Comments
 (0)